HaoHou-98 / SCGAN

Semi-Cycled Generative Adversarial Networks for Real-World Face Super-Resolution
28 stars 4 forks source link

problem with loadin the pretrained weight #4

Closed SaharR1372 closed 1 year ago

SaharR1372 commented 2 years ago

Thanks for your interesting work, would you please let me know what is the problem with this error? I have load your pretrained weight model but it does not work. Thanks in advance

RuntimeError: Error(s) in loading state_dict for G_RLS: Missing key(s) in state_dict: "layers_set_final.0.0.conv1.weight",.........................................

hamedsteiner commented 2 years ago

Based on the code base, I guess the problem is with Gh2l (High-res to low-res) a = torch.load('./pretrained_model/pretrained_model.pth')["G_h2l"], which should be changed to b = torch.load('./pretrained_model/pretrained_model.pth')["G_l2h"]. Prior to that I though the problem is with mu cuda version, etc.

HaoHou-98 commented 1 year ago

Based on the code base, I guess the problem is with Gh2l (High-res to low-res) a = torch.load('./pretrained_model/pretrained_model.pth')["G_h2l"], which should be changed to b = torch.load('./pretrained_model/pretrained_model.pth')["G_l2h"]. Prior to that I though the problem is with mu cuda version, etc.

Thank you for the solution, and I will explain it in the README.md.