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

Updating the generator using the joint loss gradient? #2

Open
1420108 opened this issue Dec 26, 2017 · 5 comments
Open

Updating the generator using the joint loss gradient? #2

1420108 opened this issue Dec 26, 2017 · 5 comments

Comments

@1420108
Copy link

1420108 commented Dec 26, 2017

Hi, thank you very much for your work. In the paper, they use the joint loss (L2 and GAN loss) gradient to update the generator G, but in your implementation, I notice that you only use L2 loss gradient to update G. Have I missed something here? Thank you.

@tadax
Copy link
Owner

tadax commented Dec 30, 2017

Thank you for your comment! You are right. I will update and re-train the model in a few days.

@avisekiit
Copy link

HI @tadax : can I now use the repo, if you have corrected how the G network is updated.

@roxanneluo
Copy link

Hi @tadax, thank you a lot for sharing your code. Do you have any updates on this issue?

@RobinCSIRO
Copy link

I think it is easy to add the discriminator loss for training generator:
def calc_g_loss(self, x, completion):
loss1 = tf.nn.l2_loss(x - completion)
loss2 = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=fake, labels=tf.ones_like(real)))
loss = loss1+loss2
return tf.reduce_mean(loss)

@fabrahman
Copy link

fabrahman commented Mar 7, 2018

Hi @RobinCSIRO have you tried that? did you get reasonable results?
I guess he skiped one step in the algorithm. But then again for pretrainig step, we dont need the GAN loss to be incorporated.
Do we have to have two g_loss? one only the l2 norm an the other with l2+GANS_loss

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

6 participants