Weight normalization - setting g constant


I want to do some experiments with weight normalization and I was wondering if it would be possible to set the g in weight normalization as a constant or a different function of time in PyTorch.

Thank you in advance!

I think the easiest way could be to write your own WeightNorm class by copy-pasting this code and manipulate the creation of g.