Normalizing Images in PyTorch
Ben Cook • Posted 2021-01-15 • Last updated 2021-10-21You can use the torchvision Normalize() transform to subtract the mean and divide by the standard deviation for image tensors in PyTorch. But it’s important to understand how the transform works and how to reverse it.