🐛 Describe the bug
Setting a 1D tensor to ToImage() gets the empty error message as shown below:
from torchvision.datasets import OxfordIIITPet
import torch
my_data = OxfordIIITPet(
root="data"
)
ti = ToImage()
ti(torch.tensor([0])) # Error
ValueError:
So, it should be something like below:
ValueError: the tensor must be 2D or more D tensor
Versions
import torchvision
torchvision.__version__ # '0.20.1'