W3cubDocs

/TensorFlow Python

tf.contrib.gan.losses.wargs.wasserstein_generator_loss

tf.contrib.gan.losses.wargs.wasserstein_generator_loss(
    discriminator_gen_outputs,
    weights=1.0,
    scope=None,
    loss_collection=tf.GraphKeys.LOSSES,
    reduction=losses.Reduction.SUM_BY_NONZERO_WEIGHTS,
    add_summaries=False
)

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

Wasserstein generator loss for GANs.

See Wasserstein GAN (https://arxiv.org/abs/1701.07875) for more details.

Args:

  • discriminator_gen_outputs: Discriminator output on generated data. Expected to be in the range of (-inf, inf).
  • weights: Optional Tensor whose rank is either 0, or the same rank as discriminator_gen_outputs, and must be broadcastable to discriminator_gen_outputs (i.e., all dimensions must be either 1, or the same as the corresponding dimension).
  • scope: The scope for the operations performed in computing the loss.
  • loss_collection: collection to which this loss will be added.
  • reduction: A tf.losses.Reduction to apply to loss.
  • add_summaries: Whether or not to add detailed summaries for the loss.

Returns:

A loss Tensor. The shape depends on reduction.

© 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/wargs/wasserstein_generator_loss