W3cubDocs

/PyTorch 2.9

torch.nn.utils.spectral_norm.remove_spectral_norm

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

Remove the spectral normalization reparameterization from a module.

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

T_module

Example

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

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.nn.utils.spectral_norm.remove_spectral_norm.html