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.