oneflow.nn.utils.remove_weight_norm¶
-
oneflow.nn.utils.
remove_weight_norm
(module: T_module, name: str = 'weight') → T_module¶ Removes the weight normalization reparameterization from a module.
- Parameters
module (Module) – containing module
name (str, optional) – name of weight parameter
For example:
>>> import oneflow as flow >>> m = flow.nn.utils.weight_norm(flow.nn.Linear(20, 40)) >>> flow.nn.utils.remove_weight_norm(m) Linear(in_features=20, out_features=40, bias=True)