-
Notifications
You must be signed in to change notification settings - Fork 140
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
Is there a bug about cyclegan? #56
Comments
I am a little confused by this. Could you point to the relevant line in the training code? Here, the fake image is -Gaurav |
When training the generator, the discriminator's 'requires_grad' is Ture. So https://github.com/GaParmar/img2img-turbo/blob/main/src/train_cyclegan_turbo.py#L205 will produce gradients for the discriminator. The gradients will update to the discriminator's parameter in https://github.com/GaParmar/img2img-turbo/blob/main/src/train_cyclegan_turbo.py#L238. |
I think that is the case for train_pix2pix_turbo.py. Gradients for the discriminator will be produced at img2img-turbo/src/train_pix2pix_turbo.py Line 200 in 573dfdd
And, the gradients won't be deleted until img2img-turbo/src/train_pix2pix_turbo.py Line 217 in 573dfdd
I think Thank you for finding this! @onepeachbiubiubiu |
I noticed that the training code does not set ‘requires_grad=False’ for the discriminator when training generators, which will conduct gradients to discriminators and force the discriminator to treat the fake image as a 'true image'.
The text was updated successfully, but these errors were encountered: