tf.contrib.gan.losses.combine_adversarial_loss( gan_loss, gan_model, non_adversarial_loss, weight_factor=None, gradient_ratio=None, gradient_ratio_epsilon=1e-06, scalar_summaries=True, gradient_summaries=True )
Defined in tensorflow/contrib/gan/python/losses/python/tuple_losses_impl.py
.
Combine adversarial loss and main loss.
Uses combine_adversarial_loss
to combine the losses, and returns a modified GANLoss namedtuple.
gan_loss
: A GANLoss namedtuple. Assume the GANLoss.generator_loss is the adversarial loss.gan_model
: A GANModel namedtuple. Used to access the generator's variables.non_adversarial_loss
: Same as main_loss
from combine_adversarial_loss
.weight_factor
: Same as weight_factor
from combine_adversarial_loss
.gradient_ratio
: Same as gradient_ratio
from combine_adversarial_loss
.gradient_ratio_epsilon
: Same as gradient_ratio_epsilon
from combine_adversarial_loss
.scalar_summaries
: Same as scalar_summaries
from combine_adversarial_loss
.gradient_summaries
: Same as gradient_summaries
from combine_adversarial_loss
.A modified GANLoss namedtuple, with non_adversarial_loss
included appropriately.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/gan/losses/combine_adversarial_loss