This is the trick used in the original paper to avoid vanishing gradients
early in training. See Generative Adversarial Nets
(https://arxiv.org/abs/1406.2661) for more details.

Args:

discriminator_gen_outputs: Discriminator output on generated data. Expected
to be in the range of (-inf, inf).

label_smoothing: The amount of smoothing for positive labels. This technique
is taken from Improved Techniques for Training GANs
(https://arxiv.org/abs/1606.03498). 0.0 means no smoothing.

weights: Optional Tensor whose rank is either 0, or the same rank as
discriminator_gen_outputs, and must be broadcastable to labels (i.e.,
all dimensions must be either 1, or the same as the corresponding
dimension).