Created
August 15, 2020 12:57
-
-
Save NiloyPurkait/bac0fd03aaf61778eb8d64e7770dd35b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 discriminator_loss(real_output, fake_output): | |
loss_object = tf.keras.losses.BinaryCrossentropy(from_logits=True) | |
real_loss = loss_object(tf.ones_like(real_output), real_output) | |
fake_loss = loss_object(tf.zeros_like(fake_output), fake_output) | |
total_loss = real_loss + fake_loss | |
return total_loss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment