(generator_ema, gan_model, gan_train_ops)
return gan_train_ops, generator_vars_to_restore
Adds generator smoothing ops.
Adds generator smoothing ops.
Adds generator smoothing ops .
def add_generator_smoothing_ops(generator_ema, gan_model, gan_train_ops):
  """Adds generator smoothing ops."""
  with tf.control_dependencies([gan_train_ops.generator_train_op]):
    new_generator_train_op = generator_ema.apply(gan_model.generator_variables)

  gan_train_ops = gan_train_ops._replace(
      generator_train_op=new_generator_train_op)
  generator_vars_to_restore = generator_ema.variables_to_restore(
      gan_model.generator_variables)
  return gan_train_ops, generator_vars_to_restore
def add_generator_smoothing_ops ( generator_ema , gan_model , gan_train_ops ) : with tf . control_dependencies ( [ gan_train_ops . generator_train_op ] ) : new_generator_train_op = generator_ema . apply ( gan_model . generator_variables ) gan_train_ops = gan_train_ops . _replace ( generator_train_op = new_generator_train_op ) generator_vars_to_restore = generator_ema . variables_to_restore ( gan_model . generator_variables ) return gan_train_ops , generator_vars_to_restore