Hi,
I am trying to use the weight normalization using the function stated in the title.
But I am getting the following errors:
    x = nn.utils.weight_norm(F.relu(self.conv1(x)), name='weight')
    File "/home/graviton/anaconda2/lib/python2.7/site-packages/torch/nn/utils/weight_norm.py", line 98, in weight_norm
    WeightNorm.apply(module, name, dim)
    File "/home/graviton/anaconda2/lib/python2.7/site-packages/torch/nn/utils/weight_norm.py", line 34, in apply
    weight = getattr(module, name)
    File "/home/graviton/anaconda2/lib/python2.7/site-packages/torch/autograd/variable.py", line 65, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'Variable' object has no attribute 'weight'

Where am I doing it wrong? Thanks.