LiDan456 / MAD-GANs

Applied generative adversarial networks (GANs) to do anomaly detection for time series data
519 stars 163 forks source link

Probelm of the discriminator loss. #5

Open DesenHuang opened 5 years ago

DesenHuang commented 5 years ago

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)"

DhrubaAdhikary commented 5 years ago

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 .

DesenHuang commented 5 years ago

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