It’s better to know which kind of type the transforms.xx is allowed.
for example:


ToTensor: (224x224 is not allowed, 224x224x1)
Converts a PIL Image or numpy.ndarray (H x W x C) in the range
[0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0]

Resize : Resize the input PIL Image to the given size (You can not Resize a tensor object)