@jpeg729 Yeah, So If we apply norm to a tensor it returns 1, if applied to a variable returns an error, and when I replace it by torch.max(torch.abs(a)), it return correct valueif written in an standalone fashion, but when I embed it to a running code , it throws the CUDA MEMORY ERROR(Which is validated by the output of nvidia-smi, which shows the memory usage exploding!). where as the same function if I use l2 norm, every thing works fine.
So My conclusion is  somehow torch.max(torch.abs(a)) is blowing up things, but why and how should I fix it… I am not able to understand. My  aim is to add a regularizer which helps in getting a l-infinity norm.