import tensorflow as tf

        logits=real_logits, labels=tf.ones_like(real_logits)))

    fake_logits = discriminator_fn(fake_data)
    if isinstance(fake_logits, (list, tuple)):
        fake_logits = fake_logits[0]
    fake_loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(
        logits=fake_logits, labels=tf.zeros_like(fake_logits)))

    d_loss = real_loss + fake_loss

    if mode == "min_fake":
        g_loss = - fake_loss
