I am sorry that the question may be easy.
But I can not find the api in pytorch that normalize a vector into a range, such as into [0,1] or [-1,] which is useful for training
for example:
a_i / sqrt(sum(a_i^2))