Least squares generator loss.
tf.contrib.gan.losses.wargs.least_squares_generator_loss( discriminator_gen_outputs, real_label=1, weights=1.0, scope=None, loss_collection=tf.GraphKeys.LOSSES, reduction=losses.Reduction.SUM_BY_NONZERO_WEIGHTS, add_summaries=False )
This loss comes from
Least Squares Generative Adversarial Networks
L = 1/2 * (D(G(z)) -
real_label) ** 2
where D(y) are discriminator logits.
discriminator_gen_outputs: Discriminator output on generated data. Expected to be in the range of (-inf, inf).
real_label: The value that the generator is trying to get the discriminator to output on generated data.
Tensorwhose 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.
tf.compat.v1.losses.Reductionto apply to loss.
add_summaries: Whether or not to add summaries for the loss.
A loss Tensor. The shape depends on