### 🐛 Describe the bug Setting a 1D tensor to [ToImage()](https://pytorch.org/vision/main/generated/torchvision.transforms.v2.ToImage.html) gets the empty error message as shown below: ```python 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 ```python import torchvision torchvision.__version__ # '0.20.1' ```