code: def minimax_discriminator_loss(
      discriminator_output_real_data: tf.Tensor,
      discriminator_output_generated_data: tf.Tensor,
      name: str = "minimax_discriminator_loss",
  ) -> tf.Tensor:
      """Discriminator loss from the original minimax GAN.
  
      This loss function implements the minimax loss
      for the discriminator as proposed in https://arxiv.org/pdf/1406.2661.pdf.
  
      Args:
        discriminator_output_real_data: Output of the discriminator for the real
          data.
        discriminator_output_generated_data: Output of the discriminator for
          generated data.
        name: The name of the name_scope that is placed around the loss.
  
      Returns:
        The loss for the discriminator.
      """
      with tf.name_scope(name=name):
          # -log(sigmoid(discriminator_output_real_data))
          loss_real = tf.nn.sigmoid_cross_entropy_with_logits(
              labels=tf.ones_like(discriminator_output_real_data),
              logits=discriminator_output_real_data,
          )
          # -log(1 - sigmoid(discriminator_output_generated_data))
          loss_generated = tf.nn.sigmoid_cross_entropy_with_logits(
              labels=tf.zeros_like(discriminator_output_generated_data),
              logits=discriminator_output_generated_data,
          )
          return loss_real + loss_generated
  
file_path: graphics/tensorflow_graphics/projects/gan/losses.py
imports: from collections import abc
  from typing import Sequence, Union
  import tensorflow
label_desc: Use image node_id 9 for calling a global function with example usage: minimax_discriminator_loss(discriminator_output_real_data, discriminator_output_generated_data, name) and returns: unknown