API

 torch / nn / torch.nn


torch.nn.utils.remove_weight_norm

torch.nn.utils.remove_weight_norm(module: T_module, name: str = 'weight') → T_module[source]

Removes the weight normalization reparameterization from a module.

Parameters
  • module (Module) – containing module

  • name (str, optional) – name of weight parameter

Example

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

此页内容是否对您有帮助