I need to save the transformed images for better efficiency too. I tried saving the transformed tensors by torch.save, but a [3, 224, 224] image tensor takes about 100M memory? That’s irrational, why?
I am handling an image dataset with 100k images. I have tried saving the transformed image tensors into .jpg and .png images, they all look good. Then i use Image.open(imageFile).convert('RGB') and transforms.ToTensor() to read the saved images, but i can’t get the correct tensor. It’s different from the original transoformed image tensor, how did that happen and how can i get the correct tensor?