- class torchvision.transforms.Normalize(mean, std, inplace=False)¶
Normalize a tensor image with mean and standard deviation. This transform does not support PIL Image. Given mean:
nchannels, this transform will normalize each channel of the input
output[channel] = (input[channel] - mean[channel]) / std[channel]
This transform acts out of place, i.e., it does not mutate the input tensor.
mean (sequence) – Sequence of means for each channel.
std (sequence) – Sequence of standard deviations for each channel.
inplace (bool,optional) – Bool to make this operation in-place.