ation reparametrization, use :func:`torch.nn.utils.parametrize.remove_parametrizations`. * The weight is no longer recomputed once at module forward; instead, it will be recomputed on every access. To restore the old behavior, use :func:`torch.nn.utils.parametrize.cached` before invoking the module in question. Args: module (Module): containing module name (str, optional): name of weight parameter dim (int, optional): dimension over which to compute the norm Returns: The original module with the weight norm hook Example:: >>> m = weight_norm(nn.Linear(20, 40), name='weight') >>> m Linear(in_features=20, out_features=40, bias=True) >>> m.weight_g.size() torch.Size([40, 1]) >>> m.weight_v.size() torch.Size([40, 20]) )