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
After training my dataset with pix2pix, I wanted to test it, but encountered the following issue:
Traceback (most recent call last):
File "C:\Users\o\Desktop\Graduation_Design_Code\pytorch-pix2pixgan\pytorch-CycleGAN-and-pix2pix-master\test.py", line 52, in
model.setup(opt) # regular setup: load and print networks; create schedulers
File "C:\Users\o\Desktop\Graduation_Design_Code\pytorch-pix2pixgan\pytorch-CycleGAN-and-pix2pix-master\models\base_model.py", line 88, in setup
self.load_networks(load_suffix)
File "C:\Users\o\Desktop\Graduation_Design_Code\pytorch-pix2pixgan\pytorch-CycleGAN-and-pix2pix-master\models\base_model.py", line 210, in load_networks
for key in list(state_dict.keys()): # need to copy keys here because we mutate in loop
File "D:\anaconda\envs\rt\lib\site-packages\torch\nn\modules\module.py", line 1207, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'UnetGenerator' object has no attribute 'keys'
How should I solve it? Thank you all
The text was updated successfully, but these errors were encountered:
After training my dataset with pix2pix, I wanted to test it, but encountered the following issue:
Traceback (most recent call last):
File "C:\Users\o\Desktop\Graduation_Design_Code\pytorch-pix2pixgan\pytorch-CycleGAN-and-pix2pix-master\test.py", line 52, in
model.setup(opt) # regular setup: load and print networks; create schedulers
File "C:\Users\o\Desktop\Graduation_Design_Code\pytorch-pix2pixgan\pytorch-CycleGAN-and-pix2pix-master\models\base_model.py", line 88, in setup
self.load_networks(load_suffix)
File "C:\Users\o\Desktop\Graduation_Design_Code\pytorch-pix2pixgan\pytorch-CycleGAN-and-pix2pix-master\models\base_model.py", line 210, in load_networks
for key in list(state_dict.keys()): # need to copy keys here because we mutate in loop
File "D:\anaconda\envs\rt\lib\site-packages\torch\nn\modules\module.py", line 1207, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'UnetGenerator' object has no attribute 'keys'
How should I solve it? Thank you all
The text was updated successfully, but these errors were encountered: