Skip to content
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

Error testing my own dataset using pix2pix #1638

Open
Rentong2022 opened this issue Mar 25, 2024 · 0 comments
Open

Error testing my own dataset using pix2pix #1638

Rentong2022 opened this issue Mar 25, 2024 · 0 comments

Comments

@Rentong2022
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant