Sorry about that, I infered that you worked with PIL Images, which is the format recognized by torchvision transforms! However, I do not know the way you store the images in your dataset, could you provide more information on your dataset?