|View source on GitHub|
Returns GAN train ops.
tf.contrib.gan.gan_train_ops( model, loss, generator_optimizer, discriminator_optimizer, check_for_unused_update_ops=True, is_chief=True, **kwargs )
The highest-level call in TF-GAN. It is composed of functions that can also be called, should a user require more control over some part of the GAN training process.
model: A GANModel.
loss: A GANLoss.
generator_optimizer: The optimizer for generator updates.
discriminator_optimizer: The optimizer for the discriminator updates.
True, throws an exception if there are update ops outside of the generator or discriminator scopes.
is_chief: Specifies whether or not the training is being run by the primary replica during replica training.
**kwargs: Keyword args to pass directly to
training.create_train_opfor both the generator and discriminator train op.
A GANTrainOps tuple of (generator_train_op, discriminator_train_op) that can be used to train a generator/discriminator pair.