I have tried the following :
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
X_train = torch.from_numpy(np.array(np.rollaxis(X_train, 3, 1), dtype=np.dtype(“Float32”)))
normalize(X_train)
And it gives me the following error : TypeError: tensor is not a torch image.