code: def minimax_generator_loss(
      discriminator_output_generated_data: tf.Tensor,
      name: str = "minimax_generator_loss",
  ) -> tf.Tensor:
      """Generator loss from the original minimax GAN.
  
      This loss function implements the non saturating version of the minimax loss
      for the generator as proposed in https://arxiv.org/pdf/1406.2661.pdf.
  
      Args:
        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 generator.
      """
      with tf.name_scope(name=name):
          # -log(sigmoid(discriminator_output_generated_data))
          return tf.nn.sigmoid_cross_entropy_with_logits(
              labels=tf.ones_like(discriminator_output_generated_data),
              logits=discriminator_output_generated_data,
          )
  
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 8 for calling a global function with example usage: minimax_generator_loss(discriminator_output_generated_data, name) and returns: tf