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

Problems with the optimization of loss. #61

Open
XJTUDog opened this issue Sep 10, 2018 · 4 comments
Open

Problems with the optimization of loss. #61

XJTUDog opened this issue Sep 10, 2018 · 4 comments

Comments

@XJTUDog
Copy link

XJTUDog commented Sep 10, 2018

For WGAN, it should maximize the loss of Discriminator, and minimize the loss of negative Generator. However, it did just in the opposite way in the codes. am I wrong?
I think it should like this:
errD_real.backward(mone) in 189.
errD_fake.backward(one) in 197.
errG.backward(mone) in 213.

@chenzhekl
Copy link

The same confusion here. I think the code should be wrong.

@merlinyx
Copy link

merlinyx commented Nov 8, 2018

maybe check #9 and then #5.

@feixiangdekaka
Copy link

errD_real.backward(mone) in 189.
errD_fake.backward(one) in 197.
errG.backward(mone) in 213.

I think you are wright , however the code is also right . There are many ways to implement the loss function .

@Kaede93
Copy link

Kaede93 commented Jul 25, 2020

In fact, I think two version of implements are right. Because the sigmoid function was not applied follow the critic, so the outputs of critic can be positive or negative. What we should do is making sure the generator and critic has opposite sign.

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

5 participants