torch.nn.utils.remove_spectral_norm

torch.nn.utils.remove_spectral_norm(module, name='weight') [source]

Removes the spectral normalization reparameterization from a module.

Parameters
  • module (Module) – containing module
  • name (str, optional) – name of weight parameter

Example

>>> m = spectral_norm(nn.Linear(40, 10))
>>> remove_spectral_norm(m)

© 2019 Torch Contributors
Licensed under the 3-clause BSD License.
https://pytorch.org/docs/1.8.0/generated/torch.nn.utils.remove_spectral_norm.html