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

AttributeError: 'CycleGANModel' object has no attribute 'rec_A' #2

Open
Rachel1111 opened this issue Feb 28, 2022 · 4 comments
Open

Comments

@Rachel1111
Copy link

Rachel1111 commented Feb 28, 2022

您好,我已经按照步骤训练好了模型,但是在test时,加载完模型后就会出现没有属性这个错误,能问下是为什么吗?

@JerryLeolfl
Copy link
Owner

test截断是不需要b->a的cycle的,在模型定义里把这个变量注释掉就好了

@jayli517
Copy link

jayli517 commented Aug 8, 2022

这个问题解决了么,我不清楚应该注释哪个文件中的哪个变量

@JerryLeolfl
Copy link
Owner

https://github.com/JerryLeolfl/pytorch-MRGAN-master/blob/main/models/cycle_gan_model.py#L31
visual_names_A = ['real_A', 'fake_B', 'rec_A', 'syth_A']
visual_names_B = ['real_B', 'fake_A', 'rec_B']
改成
visual_names_A = ['fake_B']
visual_names_B = []

@jayli517
Copy link

jayli517 commented Aug 8, 2022

好的,谢谢,成功了
我之前吧visual_names_A 也改成空了,结果一直没出结果……现在ok了

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

3 participants