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

Extra Gradient Detach? #53

Closed
Queuecumber opened this issue Feb 26, 2020 · 2 comments
Closed

Extra Gradient Detach? #53

Queuecumber opened this issue Feb 26, 2020 · 2 comments

Comments

@Queuecumber
Copy link

In

https://github.com/open-mmlab/mmsr/blob/master/codes/models/SRGAN_model.py#L189

Why do you detach to the result of netD on fake image? Won't that prevent gradient from fake images from backproping to the discriminator?

@Queuecumber
Copy link
Author

OK I guess you rerun the discriminator on 193 but is it really necessary to detach at line 189?

@xinntao
Copy link
Collaborator

xinntao commented Jul 8, 2020

In the L189, we only want to train netD with real images.

According to the official codes, https://github.com/AlexiaJM/RelativisticGAN, it does not use detach.
The two implementations (comment and uncomment ones) does not influence the final results much. I think the current implementation may be more suitable. We will revisit it and update it ~

@xinntao xinntao closed this as completed Jul 8, 2020
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