MAD-GANs icon indicating copy to clipboard operation
MAD-GANs copied to clipboard

Probelm of the discriminator loss.

Open DesenHuang opened this issue 5 years ago • 2 comments

Is the discriminator loss wrong? "D_loss_real = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=D_logit_real, labels=tf.ones_like(D_logit_real)), 1) D_loss_fake = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=D_logit_fake, labels=tf.zeros_like(D_logit_fake)), 1)" in model.py

I think the D_loss_fake should be "D_loss_fake = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=D_logit_fake, labels=tf.zeros_like(D_logit_fake)), 0)"

DesenHuang avatar Sep 13 '19 02:09 DesenHuang

No the Losses are correctly defined , the numeral 1 denotes the axis along which the mean needs to be reduced . and the labels are defined properly for the fake and the real .

DhrubaAdhikary avatar Sep 22 '19 10:09 DhrubaAdhikary

Oh, yep. I was wrong. Thank you very much.

DesenHuang avatar Sep 23 '19 09:09 DesenHuang