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

Poor results at 1024x1024 #77

Closed
DavidRees87 opened this issue May 2, 2022 · 6 comments
Closed

Poor results at 1024x1024 #77

DavidRees87 opened this issue May 2, 2022 · 6 comments

Comments

@DavidRees87
Copy link

DavidRees87 commented May 2, 2022

I'm having issues training the same images that worked well at 512x512 at the higher resolution of 1024x1024. I've seen some other comments from people experiencing something similar. I've tried using 'fastgan_lite' but in colab I get this error message:


UnboundLocalError Traceback (most recent call last)
in ()
21 seed=0,
22 workers=0,
---> 23 restart_every=999999,
24 )

in train(**kwargs)
72 c.D_kwargs.backbone_kwargs.proj_type = 2
73 c.D_kwargs.backbone_kwargs.num_discs = 4
---> 74 c.D_kwargs.backbone_kwargs.separable = use_separable_discs
75 c.D_kwargs.backbone_kwargs.cond = opts.cond
76

UnboundLocalError: local variable 'use_separable_discs' referenced before assignment

Any ideas how to resolve this and get better training results at 1024?

Thank you

@DavidRees87
Copy link
Author

Any thoughts on this? Thank you

@woctezuma
Copy link

woctezuma commented May 9, 2022

@DavidRees87
Copy link
Author

Thanks for the reply. No, I'm not using anything different. It works just fine when I use --cfg = 'fastgan' but as soon as I try and use --cfg = 'fastgan_lite' I get that error message.

Everything else is the same and up to date, I can see in 'train.py' the fastgan_lite config is there but still get the issue.

Tried again just now and still happening.

@woctezuma
Copy link

woctezuma commented May 9, 2022

@woctezuma
Copy link

woctezuma commented May 9, 2022

Try replacing:

https://github.com/autonomousvision/projected_gan/blob/e1c246b8bdce4fac3c2bfcb69df309fc27df9b86/train.py#L209

with:

elif opts.cfg in ['fastgan', 'fastgan_lite', 'fastgan-lite']:

And replacing:

https://github.com/autonomousvision/projected_gan/blob/e1c246b8bdce4fac3c2bfcb69df309fc27df9b86/train.py#L211

with:

c.G_kwargs.synthesis_kwargs.lite = (opts.cfg == 'fastgan_lite') or (opts.cfg == 'fastgan-lite')

Otherwise, check with a debugger the value of opts.cfg.

@DavidRees87
Copy link
Author

Ah, I've figured out what was wrong! It wasn't an issue of confusing the _ with -.

This part of the code is in the 'train.py' but it isn't in the notebook cell you run before training, the "fastgan_lite" part is missing as well as another line. Once I copied across the update in 'train.py' it has started training properly using fastgan_lite.

Thanks for your help, hopefully this will help improve the results I get at 1024x1024!

Cheers

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

2 participants