评价此页

torch.nn.utils.remove_weight_norm#

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

Remove the weight normalization reparameterization from a module.

参数
  • module (Module) – 包含的模块

  • name (str, optional) – 权重参数的名称

返回类型

T_module

示例

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