torch.nn.utils.remove_weight_norm
- torch.nn.utils.remove_weight_norm(module, name='weight')
Remove the weight normalization reparameterization from a module.
- Parameters:
module (Module) – containing module
Remove the weight normalization reparameterization from a module.
module (Module) – containing module
name (str, optional) – name of weight parameter
T_module
>>> warnings.filterwarnings(
... "ignore", message=".*torch.nn.utils.weight_norm"
... ) # docs: hide
>>> m = weight_norm(nn.Linear(20, 40))
>>> remove_weight_norm(m)