Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.gan.features.compute_spectral_norm

View source on GitHub

Estimates the largest singular value in the weight tensor.

tf.contrib.gan.features.compute_spectral_norm(
    w_tensor,
    power_iteration_rounds=1,
    name=None
)

Args:

  • w_tensor: The weight matrix whose spectral norm should be computed.
  • 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:

The largest singular value (the spectral norm) of w.