-
Notifications
You must be signed in to change notification settings - Fork 65
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
UnetSkipConnectionBlock Attribute Error #43
Comments
Hello, you can try using a generator with resnet9 as the backbone network. This setting can be modified in the testing script. |
I don't think this is a solution because the '--netG' default setting in base_options.py is 'resnet_9blocks' as following: I solved this problem in another way. I use the BCI code from another open-source project of your team and the pretrained model you provided, and this combination can run. |
You need to add |
Hello,
I am trying to run pix2pix model and getting this error:
python test.py --dataroot ./datasets/ --model pix2pix --direction AtoB --preprocess scale_width_and_crop --load_size 320 --crop_size 256
dataset [AlignedDataset] was created
initialize network with normal
model [Pix2PixModel] was created
loading the model from ./checkpoints\experiment_name\latest_net_G.pth
Traceback (most recent call last):
File "D:\LLVIP-main\LLVIP-main\pix2pixGAN\test.py", line 47, in
model.setup(opt) # regular setup: load and print networks; create schedulers
File "D:\LLVIP-main\LLVIP-main\pix2pixGAN\models\base_model.py", line 88, in setup
self.load_networks(load_suffix)
File "D:\LLVIP-main\LLVIP-main\pix2pixGAN\models\base_model.py", line 198, in load_networks
self.__patch_instance_norm_state_dict(state_dict, net, key.split('.'))
File "D:\LLVIP-main\LLVIP-main\pix2pixGAN\models\base_model.py", line 174, in __patch_instance_norm_state_dict
self.__patch_instance_norm_state_dict(state_dict, getattr(module, key), keys, i + 1)
File "D:\LLVIP-main\LLVIP-main\pix2pixGAN\models\base_model.py", line 174, in __patch_instance_norm_state_dict
self.__patch_instance_norm_state_dict(state_dict, getattr(module, key), keys, i + 1)
File "D:\LLVIP-main\LLVIP-main\pix2pixGAN\pix2pix_env\lib\site-packages\torch\nn\modules\module.py", line 1695, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'UnetSkipConnectionBlock' object has no attribute '1'
The text was updated successfully, but these errors were encountered: