Transforms for TensorDataset

Does Pytorch support something like transforms(used for DataLoader) for image data loaded with a TensorDataset method?

Most image transformations are defined for PIL.Images.
You could add transforms.ToPILImage() as the first transformation, which will add a small overhead, but allows you to use any torchvision.transforms.

1 Like

That works.Thanks a lot.