You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, use the models download from link in notebook is fine, but when i try to use the model trained from pytorch-CycleGAN-and-pix2pix, it will shows this error:
Traceback (most recent call last):
File "test.py", line 56, in <module>
netG = load_model('./models/facades_label2photo/test_G.pth')
File "test.py", line 47, in load_model
__patch_instance_norm_state_dict(state_dict, net_g, key.split('.') )
File "test.py", line 36, in __patch_instance_norm_state_dict
__patch_instance_norm_state_dict(state_dict, getattr(module, key), keys, i + 1)
File "test.py", line 36, in __patch_instance_norm_state_dict
__patch_instance_norm_state_dict(state_dict, getattr(module, key), keys, i + 1)
File "/Users/.../miniconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __getattr__
type(self).__name__, name))
AttributeError: 'Sequential' object has no attribute 'model'
After debug, i see the keys of them is different
Models download from link in jupyter have very clear structure like['model','1','something']
But in the model of my-self is a lot of like ['model','model','1','model','3','something']
Hi, use the models download from link in notebook is fine, but when i try to use the model trained from
pytorch-CycleGAN-and-pix2pix
, it will shows this error:After debug, i see the keys of them is different
Models download from link in jupyter have very clear structure like
['model','1','something']
But in the model of my-self is a lot of like
['model','model','1','model','3','something']
Compare:
Keys must have
My one
The text was updated successfully, but these errors were encountered: