-
Notifications
You must be signed in to change notification settings - Fork 72
Description
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'