What if the variable I am trying to normalize is in fact a Parameter  from nn.parameter rather than a  Variable  ?
Then in this case I get the following error for any of the above options I try:
TypeError: cannot assign ‘torch.autograd.variable.Variable’ as parameter ‘W’ (torch.nn.Parameter or None expected)
class myUnit(nn.Module):
    def __init__(self,myParameter):
        super(myUnit, self).__init__()
        self.myParameter = Parameter(myParameter,requires_grad=True)
    def forward(self,input):
        """
        Whatever operation. Just an example:
        """
        self.myParameter = F.normalize(self.myParameter,p=2,dim=1)
        output = self.myParameter * input - 1
        return output
Can I still keep using Parameter   in my customized network and be able to also normalize it?