-
Notifications
You must be signed in to change notification settings - Fork 68
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
Errror loading pretrained model #36
Comments
I'm facing the same issue. |
@ipereira-uib Did you solve it? I have the same problem |
I don't solve it. If I find the problem I will post it here. :( |
I'm facing the same issue only when I try to load the pre-trained RBPN_4x model in training. |
I have the same error. Maybe it is a pyflow issue with windows? [pip3] numpy==1.17.0 |
Where i try to test the model with a diferents weights of netG_epoch_4_1.pth It shows me the following error:
Traceback (most recent call last):
File "/content/drive/MyDrive/iSeeBetter/utils.py", line 19, in loadPreTrainedModel
model.load_state_dict(state_dict)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Net:
Missing key(s) in state_dict: "feat0.conv.weight", "feat0.conv.bias", "feat0.act.weight", "feat1.conv.weight", "feat1.conv.bias", "feat1.act.weight", "DBPN.feat1.conv.weight", "DBPN.feat1.conv.bias", "DBPN.feat1.act.weight", "DBPN.up1.up_conv1.deconv.weight", "DBPN.up1.up_conv1.deconv.bias", "DBPN.up1.up_conv1.act.weight", "DBPN.up1.up_conv2.conv.weight", "DBPN.up1.up_conv2.conv.bias", "DBPN.up1.up_conv2.act.weight", "DBPN.up1.up_conv3.deconv.weight", ...
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "iSeeBetterTest.py", line 213, in
eval()
File "iSeeBetterTest.py", line 95, in eval
utils.loadPreTrainedModel(gpuMode=args.gpu_mode, model=model, modelPath=modelPath)
File "/content/drive/MyDrive/iSeeBetter/utils.py", line 32, in loadPreTrainedModel
model.load_state_dict(new_state_dict)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Net:
Missing key(s) in state_dict: "feat0.conv.weight", "feat0.conv.bias", "feat0.act.weight", "feat1.conv.weight", "feat1.conv.bias", "feat1.act.weight", "DBPN.feat1.conv.weight", "DBPN.feat1.conv.bias", "DBPN.feat1.act.weight", "DBPN.up1.up_conv1.deconv.weight", "DBPN.up1.up_conv1.deconv.bias", "DBPN.up1.up_conv1.act.weight", "DBPN.up1.up_conv2.conv.weight", "DBPN.up1.up_conv2.conv.bias", "DBPN.up1.up_conv2.act.weight", "DBPN.up1.up_conv3.deconv.weight", "DBPN.up1.up_conv3.deconv.bias", "DBPN.up1.up_conv3.act.weight", "DBPN.down1.down_conv1.conv.weight", "DBPN.down1.down_conv1.conv.bias", "DBPN.down1.down_conv1.act.weight", "DBPN.down1.down_conv2.deconv.weight", "DBPN.down1.down_conv2.deconv.bias", "DBPN.down1.down_conv2.act.weight", "DBPN.down1.down_conv3.conv.weight", ...
The text was updated successfully, but these errors were encountered: