hellopipu/PromptMR

hello!I have encountered this problem

Opened this issue · 2 comments

When I run the pretrained file, an error occurs:
Traceback (most recent call last):
File "run_pretrained_promptmr_fastmri_knee_inference.py", line 182, in
torch.device(args.device),
File "run_pretrained_promptmr_fastmri_knee_inference.py", line 121, in run_inference
model.load_state_dict(torch.load(state_dict_file))
File "/home/zhengkaiyi/anaconda3/envs/zky/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1672, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for PromptMR:
Is it because I ran the files in the wrong order, or is there another reason? Could you help me solve it?

Did you download the pretrained model? If so, could you show the full error message?

RuntimeError: Error(s) in loading state_dict for PromptMR:

Did you download the pretrained model? If so, could you show the full error message?

RuntimeError: Error(s) in loading state_dict for PromptMR:Hello, thank you for your response. I am currently facing two issues. The first issue is that when I tried to load the pre trained model, I had already downloaded the file Knee_leaderboardsteate_dict.pt. However, when I tried to run it, I encountered an error message that was very long. The error messages were two separate ones. The first one is: Missing key (s) in stateudict: "sens_net. norm_unet. unet. feat_extract. weight", "sens_net. norm_unet. unet. enc_level1. encoder. 0. body. 0. weight", "sens_net. norm_unet. unet. weight" errors such as "t. enc_level1. encoder. 0. body. 1. weight" and so on. The second one is: Unexpected key (s) in state_dict: "sens_net. form_unet. unet. downsample_layers. 0. layers. 0. weight", "sens_net. form_unet. unet. downsample_layers. 0. layers. 4. weight", "sens_net. form_unet. unet. downsample_layers. 1. layers. 0. weight", and so on. May I ask what caused this error. The second question is that when I load the training model, the system cannot find the path to the dataset to be trained. Where should I modify my path? (The dataset I downloaded is the FastMRI dataset from New York University, using the file kne_multicoil_train_batch_1.) Is the dataset I used correct?