Open sixgod696 opened 1 year ago
你好,在加载模型进行test时,显示以下错误
Traceback (most recent call last): File "/content/drive/MyDrive/SRresaerch/SIGA/SIGA_R/test.py", line 223, in <module> test(opt) File "/content/drive/MyDrive/SRresaerch/SIGA/SIGA_R/test.py", line 127, in test model.load_state_dict(pretrained_state_dict['net']) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for DataParallel: Unexpected key(s) in state_dict: "module.model_one.Transformation.GridGenerator.inv_delta_C", "module.model_one.Transformation.GridGenerator.P_hat".
请问这可能是什么导致的问题?
Please refer to SIGA_R/modules/transformation.py 中 GridGenerator, you can ignore the issue. Try to use load_state_dict(model_path, strict=False)
Hi after making this change in SIGA_S/test.py, I am getting th error - 'No module named 'Parallel_test''. KIndly provide the code of Parallel_test
你好,在加载模型进行test时,显示以下错误
Traceback (most recent call last): File "/content/drive/MyDrive/SRresaerch/SIGA/SIGA_R/test.py", line 223, in <module> test(opt) File "/content/drive/MyDrive/SRresaerch/SIGA/SIGA_R/test.py", line 127, in test model.load_state_dict(pretrained_state_dict['net']) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for DataParallel: Unexpected key(s) in state_dict: "module.model_one.Transformation.GridGenerator.inv_delta_C", "module.model_one.Transformation.GridGenerator.P_hat".
请问这可能是什么导致的问题?