(gan_model, gan_loss, **kwargs)
return gan_train_ops, tf.get_collection(
      tf.GraphKeys.GLOBAL_VARIABLES, scope=var_scope.name)
Defines progressive GAN train ops.

  Args:
    gan_model: A `GANModel` namedtuple.
    gan_loss: A `GANLoss` namedtuple.
    **kwargs: A dictionary of
        'adam_beta1': A float of Adam optimizer beta1.
        'adam_beta2': A float of Adam optimizer beta2.
        'generator_learning_rate': A float of generator learning rate.
        'discriminator_learning_rate': A float of discriminator learning rate.

  Returns:
    A tuple of `GANTrainOps` namedtuple and a list variables tracking the state
    of optimizers.
Defines progressive GAN train ops.
Defines progressive GAN train ops .
def define_train_ops(gan_model, gan_loss, **kwargs):
  """Defines progressive GAN train ops.

  Args:
    gan_model: A `GANModel` namedtuple.
    gan_loss: A `GANLoss` namedtuple.
    **kwargs: A dictionary of
        'adam_beta1': A float of Adam optimizer beta1.
        'adam_beta2': A float of Adam optimizer beta2.
        'generator_learning_rate': A float of generator learning rate.
        'discriminator_learning_rate': A float of discriminator learning rate.

  Returns:
    A tuple of `GANTrainOps` namedtuple and a list variables tracking the state
    of optimizers.
  """
  with tf.variable_scope('progressive_gan_train_ops') as var_scope:
    beta1, beta2 = kwargs['adam_beta1'], kwargs['adam_beta2']
    gen_opt = tf.train.AdamOptimizer(kwargs['generator_learning_rate'], beta1,
                                     beta2)
    dis_opt = tf.train.AdamOptimizer(kwargs['discriminator_learning_rate'],
                                     beta1, beta2)
    gan_train_ops = tfgan.gan_train_ops(gan_model, gan_loss, gen_opt, dis_opt)
  return gan_train_ops, tf.get_collection(
      tf.GraphKeys.GLOBAL_VARIABLES, scope=var_scope.name)
def define_train_ops ( gan_model , gan_loss , * * kwargs ) : with tf . variable_scope ( 'progressive_gan_train_ops' ) as var_scope : beta1 , beta2 = kwargs [ 'adam_beta1' ] , kwargs [ 'adam_beta2' ] gen_opt = tf . train . AdamOptimizer ( kwargs [ 'generator_learning_rate' ] , beta1 , beta2 ) dis_opt = tf . train . AdamOptimizer ( kwargs [ 'discriminator_learning_rate' ] , beta1 , beta2 ) gan_train_ops = tfgan . gan_train_ops ( gan_model , gan_loss , gen_opt , dis_opt ) return gan_train_ops , tf . get_collection ( tf . GraphKeys . GLOBAL_VARIABLES , scope = var_scope . name )