-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Train the DL-based reconstruction with UFLoss #6
Comments
Please set args.loss_normalized = True and try again, and I will solve this issue, Thanks! |
The loss_normalized is setting True, but it can’t help. |
I see, how did you train the UFLoss? the error is not about the normalization. It's about the checkpoint loading, how many patches did you use to train the UFLoss feature mapping network |
I trained the UFloss using launch_training_patch_learning.sh. |
The total patch_data number I used is 311360. The multicoil knee dataset I downloaded has 973 .h5 files. And then it becomes 15568 going through the data_preprocessing.py. Then to do patch_extraction.py, it becomes 311360. But the error say the current model is torch.Size([256,2457600]). I don't know why it's so huge. |
I've got some new problem. After Successfully loaded UFLoss model (Traditional), the error appeared .
It's about compute_metrics in train_ufloss.py and in train_ufloss.py the line 204 to 228. I don't understand it. Can you help me explain? I'll thank you so much.
|
In sigpy.block.arrat_to_blocks, the dim should be <=3 . Source code: (blk_shape (tuple): block shape of length ndim, with ndim={1, 2, 3}.) But the blk_shape dim you gave is 4 lead to this problem. Which dim should be deleted or something else. I have try my best to deal with it, but it doesn't work. May you give me some advice. |
Hi, I believe it is a sigpy version mismatch! |
Thanks you for replying. We can contact by email or github. And my email is [email protected]. You can email to me anytime. |
Traceback (most recent call last):
File "../train_ufloss.py", line 803, in
main(args)
File "../train_ufloss.py", line 562, in main
model_re.load_state_dict(
File "/home/img/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1223, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Model:
size mismatch for memory_bank: copying a param with shape torch.Size([256, 1]) from checkpoint, the shape in current model is torch.Size([256, 2457600]).
This is the error when running launch_training_MoDL_traditional_UFLoss_256_demo.sh. The model shape is not corresponding, so why? I can’t deal with it.
And the other problem is in the file train_ufloss.py in line 193/194.
if args.loss_normalized == False:
output = output * std + mean
target = target * std + mean
Both the std and mean are not defined. What should I do?
The text was updated successfully, but these errors were encountered: