Missed TensorFlow World? Check out the recap. Learn more

Module: tf.contrib.gan.features

View source on GitHub

TFGAN features module.

This module includes support for virtual batch normalization, buffer replay, conditioning, etc.


class VBN: A class to perform virtual batch normalization.


clip_discriminator_weights(...): Modifies an optimizer so it clips weights to a certain value.

clip_variables(...): Modifies an optimizer so it clips weights to a certain value.

compute_spectral_norm(...): Estimates the largest singular value in the weight tensor.

condition_tensor(...): Condition the value of a tensor.

condition_tensor_from_onehot(...): Condition a tensor based on a one-hot tensor.

keras_spectral_normalization(...): A context manager that enables Spectral Normalization for Keras.

spectral_norm_regularizer(...): Returns a functions that can be used to apply spectral norm regularization.

spectral_normalization_custom_getter(...): Custom getter that performs Spectral Normalization on a weight tensor.

spectral_normalize(...): Normalizes a weight matrix by its spectral norm.

tensor_pool(...): Queue storing input values and returning random previously stored ones.