Is it possible to get per channel mean and variance and use on images in pytorch?
I want to center(by subtracting the mean) and normalizing(by dividing by the standard deviation) of an image with 3 channels(RGB) in Pytorch.
Is my approach below correct?
centered_images = images - images.mean()
normalized_images = images/images.std()
images.mean() returns only a value for the batch. Is this correct?