W3cubDocs

/TensorFlow Python

tf.contrib.gan.losses.cycle_consistency_loss

tf.contrib.gan.losses.cycle_consistency_loss(
    cyclegan_model,
    scope=None,
    add_summaries=False
)

Defined in tensorflow/contrib/gan/python/losses/python/tuple_losses_impl.py.

Defines the cycle consistency loss.

Uses cycle_consistency_loss to compute the cycle consistency loss for a cyclegan_model.

Args:

  • cyclegan_model: A CycleGANModel namedtuple.
  • scope: The scope for the operations performed in computing the loss. Defaults to None.
  • add_summaries: Whether or not to add detailed summaries for the loss. Defaults to False.

Returns:

A scalar Tensor of cycle consistency loss.

Raises:

  • ValueError: If cyclegan_model is not a CycleGANModel namedtuple.

© 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/cycle_consistency_loss