Discriminator loss

The loss function is the same as for the vanilla GAN:

So, we can directly write the following:

D_loss_real = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=D_logits_real,
labels=tf.ones_like(D_logits_real)))

D_loss_fake = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=D_logits_fake,
labels=tf.zeros_like(D_logits_fake)))

D_loss = D_loss_real + D_loss_fake
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset