Rate this Page
โ˜… โ˜… โ˜… โ˜… โ˜…

torch.nn.utils.remove_weight_norm#

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

Remove the weight normalization reparameterization from a module.

Parameters
  • module (Module) โ€“ containing module

  • name (str, optional) โ€“ name of weight parameter

Return type

T_module

Example

>>> m = weight_norm(nn.Linear(20, 40))
>>> remove_weight_norm(m)