Hi, I’m coding an EuroSat torch VisionDataset.
My __getitem__() method return Tuple[Any, Any]. My images are already store in torch.Tensor before the transformation (for RGB image I use torchvision.io.read_image that directly return Tensor and for full channel image I use gdal). But I see many torchvision dataset that store images as numpy array or even PIL Image. It seems to be very common as many people apply a T.ToTensor() on the dataset.
So what is the best practice in pytorch, directly using torch.Tensor and avoiding a ToTensor transform or using np array ?