parameters: (self,
                 model_dir=None,
                 generator_fn=None,
                 discriminator_fn=None,
                 generator_loss_fn=None,
                 discriminator_loss_fn=None,
                 generator_optimizer=None,
                 discriminator_optimizer=None,
                 add_summaries=None,
                 use_loss_summaries=True,
                 config=None)
docstring: Initializes a GANEstimator instance.
  
      Args:
        model_dir: Directory to save model parameters, graph and etc. This can
          also be used to load checkpoints from the directory into a estimator
          to continue training a previously saved model.
        generator_fn: A python function that takes a Tensor, Tensor list, or
          Tensor dictionary as inputs and returns the outputs of the GAN
          generator. See `TFGAN` for more details and examples.
        discriminator_fn: A python function that takes the output of
          `generator_fn` or real data in the GAN setup, and `generator_inputs`.
          Outputs a Tensor in the range [-inf, inf]. See `TFGAN` for more details
          and examples.
        generator_loss_fn: The loss function on the generator. Takes a `GANModel`
          tuple.
        discriminator_loss_fn: The loss function on the discriminator. Takes a
          `GANModel` tuple.
        generator_optimizer: The optimizer for generator updates, or a function
          that takes no arguments and returns an optimizer. This function will
          be called when the default graph is the `GANEstimator`'s graph, so
          utilities like `tf.contrib.framework.get_or_create_global_step` will
          work.
        discriminator_optimizer: Same as `generator_optimizer`, but for the
          discriminator updates.
        add_summaries: `None`, a single `SummaryType`, or a list of `SummaryType`.
        use_loss_summaries: If `True`, add loss summaries. If `False`, does not.
          If `None`, uses defaults.
        config: `RunConfig` object to configure the runtime settings.
docstring_summary: Initializes a GANEstimator instance.
docstring_tokens: Initializes a GANEstimator instance .
function: def __init__(self,
                 model_dir=None,
                 generator_fn=None,
                 discriminator_fn=None,
                 generator_loss_fn=None,
                 discriminator_loss_fn=None,
                 generator_optimizer=None,
                 discriminator_optimizer=None,
                 add_summaries=None,
                 use_loss_summaries=True,
                 config=None):
      """Initializes a GANEstimator instance.
  
      Args:
        model_dir: Directory to save model parameters, graph and etc. This can
          also be used to load checkpoints from the directory into a estimator
          to continue training a previously saved model.
        generator_fn: A python function that takes a Tensor, Tensor list, or
          Tensor dictionary as inputs and returns the outputs of the GAN
          generator. See `TFGAN` for more details and examples.
        discriminator_fn: A python function that takes the output of
          `generator_fn` or real data in the GAN setup, and `generator_inputs`.
          Outputs a Tensor in the range [-inf, inf]. See `TFGAN` for more details
          and examples.
        generator_loss_fn: The loss function on the generator. Takes a `GANModel`
          tuple.
        discriminator_loss_fn: The loss function on the discriminator. Takes a
          `GANModel` tuple.
        generator_optimizer: The optimizer for generator updates, or a function
          that takes no arguments and returns an optimizer. This function will
          be called when the default graph is the `GANEstimator`'s graph, so
          utilities like `tf.contrib.framework.get_or_create_global_step` will
          work.
        discriminator_optimizer: Same as `generator_optimizer`, but for the
          discriminator updates.
        add_summaries: `None`, a single `SummaryType`, or a list of `SummaryType`.
        use_loss_summaries: If `True`, add loss summaries. If `False`, does not.
          If `None`, uses defaults.
        config: `RunConfig` object to configure the runtime settings.
      """
      # TODO(joelshor): Explicitly validate inputs.
  
      def _model_fn(features, labels, mode):
        gopt = (generator_optimizer() if callable(generator_optimizer) else
                generator_optimizer)
        dopt = (discriminator_optimizer() if callable(discriminator_optimizer)
                else discriminator_optimizer)
        gan_head = head_lib.gan_head(
            generator_loss_fn, discriminator_loss_fn, gopt, dopt,
            use_loss_summaries)
        return _gan_model_fn(
            features, labels, mode, generator_fn, discriminator_fn, gan_head,
            add_summaries)
  
      super(GANEstimator, self).__init__(
          model_fn=_model_fn, model_dir=model_dir, config=config)
function_tokens: def __init__ ( self , model_dir = None , generator_fn = None , discriminator_fn = None , generator_loss_fn = None , discriminator_loss_fn = None , generator_optimizer = None , discriminator_optimizer = None , add_summaries = None , use_loss_summaries = True , config = None ) : # TODO(joelshor): Explicitly validate inputs. def _model_fn ( features , labels , mode ) : gopt = ( generator_optimizer ( ) if callable ( generator_optimizer ) else generator_optimizer ) dopt = ( discriminator_optimizer ( ) if callable ( discriminator_optimizer ) else discriminator_optimizer ) gan_head = head_lib . gan_head ( generator_loss_fn , discriminator_loss_fn , gopt , dopt , use_loss_summaries ) return _gan_model_fn ( features , labels , mode , generator_fn , discriminator_fn , gan_head , add_summaries ) super ( GANEstimator , self ) . __init__ ( model_fn = _model_fn , model_dir = model_dir , config = config )