torch.nn.utils.remove_spectral_norm — PyTorch 2.7 documentation (original) (raw)

Shortcuts

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

Remove the spectral normalization reparameterization from a module.

Parameters

Return type

T_module

Example

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

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.