-
Notifications
You must be signed in to change notification settings - Fork 47
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
The loss function in WGAN GP seems a little bit confusing #8
Comments
Could you provide how you replace |
Thank you for your reply !!! """
""" Above is the loss function you use in WGAN-GP, right? In the original GAN, we use a sigmoid to constrain the output of D, and we define the loss with log(D). But in WGAN, there should not be a log to wrap the D, because the D is used to fit a function f which is And in WGAN-GP, we don't use the clip strategy, we use a GP to meet the Lipschitz condition. So I think the best loss when we implement WGAN-GP should be like this : But when I replace your loss with the version above,it failed!!!.. Firstly, I think if we use the loss function offered by you, we are just training an original GAN rather than WGAN-GP.. Also, I found that you are using a lamda = 0.25 .. But usually, people use lambada = 10.. Also,I have compared your code with other implementations.. I find that there is some differences when calculating GP.. In your code : But in other implementations, they usually use : Also In your code : But the most used version is : These points also make me think that your GP don't function much .. |
Here is the WGAN-GP we referenced. |
Thank you! I will go to check it again. |
Because We use WGAN-GP with condition label, our loss has to contain the part of the condition. |
Do you mean , as you have to contain the condition loss so you have to use a log ? I am testing the hw3-1, there is no label, and don't need a condition item. |
And another important question is : Whether the calculation of GP is right ? ... I really think it seems to be wrong... |
Update |
Cool, thanks for your experiments. |
Really? In discriminators? Maybe you mean generator? Can We add norm layers in discriminator for WGan? |
You can take a look at the conclusions of this paper by Google. |
Oh, I get it. Thanks!!! |
I notice that your loss in WGAN GP is different from that in the original paper. From the theory of GAN, the loss should just use D and don't need a log to wrap it . BUT I found that you have used a log ... I tested the code , your version works very well , and then I replace the loss with the version offered by the paper , but it behaves badly ...
I don't know the reason ,... I think using D WITHOUT LOG is more right theorically ... if we use a log , won’t it just be the same to. GAN ?
The text was updated successfully, but these errors were encountered: