I have a tensor X of shape [B, 3 , 240, 320] where B represents the batch size 3 represents the channels, 240 the height, 320 the width.
I need to find the norm along the channels dimension(3channels) and normalize along that dimension, i.e. each subtensor comprising of the 3 channels should have norm 1.
Can you all please suggest how I can do that?
Thanks!