Created
August 27, 2018 20:32
-
-
Save Tathagatd96/d657bd0477d09097e065173706664868 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def loss_func(logits_in,labels_in): | |
return tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=logits_in,labels=labels_in)) | |
D_real_loss=loss_func(D_logits_real,tf.ones_like(D_logits_real)*0.9) #Smoothing for generalization | |
D_fake_loss=loss_func(D_logits_fake,tf.zeros_like(D_logits_real)) | |
D_loss=D_real_loss+D_fake_loss | |
G_loss= loss_func(D_logits_fake,tf.ones_like(D_logits_fake)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment