richzhang / colorization-pytorch

PyTorch reimplementation of Interactive Deep Colorization
https://richzhang.github.io/ideepcolor/
MIT License
598 stars 114 forks source link

'SIGGRAPHGenerator' object has no attribute 'model' #25

Open joannanananana opened 2 years ago

joannanananana commented 2 years ago

when running on MAC(python3.5.4),I encountered the following problem:'SIGGRAPHGenerator' object has no attribute 'model' I wonder how to fix it? Traceback (most recent call last): File "test.py", line 40, in model.setup(opt) File "/Users/joanna/Desktop/colorization/colorization-pytorch-master/models/base_model.py", line 42, in setup self.load_networks(opt.which_epoch) File "/Users/joanna/Desktop/colorization/colorization-pytorch-master/models/base_model.py", line 136, in load_networks self.patch_instance_norm_state_dict(state_dict, net, key.split('.')) File "/Users/joanna/Desktop/colorization/colorization-pytorch-master/models/base_model.py", line 116, in patch_instance_norm_state_dict self.__patch_instance_norm_state_dict(state_dict, getattr(module, key), keys, i + 1) File "/Users/joanna/opt/anaconda3/envs/color/lib/python3.5/site-packages/torch/nn/modules/module.py", line 576, in getattr type(self).name, name)) AttributeError: 'SIGGRAPHGenerator' object has no attribute 'model'

Zhairest commented 1 year ago

me too. did you make it out in the end?