TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.gan.features.spectral_normalize

View source on GitHub

Normalizes a weight matrix by its spectral norm.

tf.contrib.gan.features.spectral_normalize(
    w,
    power_iteration_rounds=1,
    name=None
)

Args:

  • w: The weight matrix to be normalized.
  • power_iteration_rounds: The number of iterations of the power method to perform. A higher number yields a better approximation.
  • name: An optional scope name.

Returns:

A normalized weight matrix tensor.