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

sometimes loss is negative during training model #45

Open
hw118118 opened this issue Mar 1, 2019 · 1 comment
Open

sometimes loss is negative during training model #45

hw118118 opened this issue Mar 1, 2019 · 1 comment

Comments

@hw118118
Copy link

hw118118 commented Mar 1, 2019

I use Tensorflow to do the work.And my loss:
self.g_loss = -tf.reduce_mean(d_logits_fake)
self.d_loss = tf.reduce_mean(d_logits_fake) - tf.reduce_mean(d_logits_real)+GP
but during traning,I find sometimes g_loss is negative.I don't know why i will get it.Who will explain it

@silentsaber
Copy link

I think that's when training generator, we want it produce fake data to fool the discriminator, so the d_logits_fake will be quite large like the real data. So d_logits_fake will be a positive val.
when training discriminator, d_logits_fake is quite small instead. That's mean it is a negtive value

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