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

loss_D in SRGAN #43

Closed
alsombra opened this issue Apr 7, 2019 · 3 comments
Closed

loss_D in SRGAN #43

alsombra opened this issue Apr 7, 2019 · 3 comments

Comments

@alsombra
Copy link

alsombra commented Apr 7, 2019

Hello and my thanks for this great repo. I like how your code is simple and effective.

I would like to point out that you are using MSE for your Discriminator Loss instead of Binary Cross Entropy. If you have a specific reason for why you are doing that, could you share it?

@eriklindernoren
Copy link
Owner

Hi, thanks. :) Yes, I use a least squares objective for the discriminator. This way of training GANs was first introduced in the paper on LSGAN (https://arxiv.org/abs/1611.04076), and has been shown to help solve convergence issues for GANs. It's pretty common on more recent GAN varieties and I have found it to work quite well.

@alsombra
Copy link
Author

alsombra commented Apr 9, 2019

Thanks for the reply and for the source paper. I did not know that. Indeed, I tried training your srgan using both BCE and MSE as loss just to make sure and the results looked pretty similar!

@alsombra alsombra closed this as completed Apr 9, 2019
@HareshKarnan
Copy link

this is the same case with the conditional gan example. Thanks for clarifying.

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