Could you point out which version of torchvision do you refer to?
I am using torch==1.7.1+cu101 torchvision==0.8.2+cu101. According to PyTorch 1.7.1 documentation: “All transformations accept PIL Image, Tensor Image or batch of Tensor Images as input.”
Still, when trying to apply transforms.RandomVerticalFlip() and transforms.RandomHorizontalFlip() to a torch.tensor with torch.Size([10, 8, 8]) → (C, H, W) shape, I am getting:
TypeError: img should be PIL Image. Got <class 'numpy.ndarray'> from site-packages/torchvision/transforms/functional_pil.py", line 73, in vflip
raise TypeError(‘img should be PIL Image. Got {}’.format(type(img))).