Thank you for your reply! I read the tutorial and I have a question.
I also have a CSV file containing, for each row, the path to the image and the related label.
In the tutorial they say

We will read the csv in  __init__  but leave the reading of images to  __getitem__ . This is memory efficient because all the images are not stored in the memory at once but read as required.

Do you think it’s better (in memory and performance terms) for me using the tutorial approach instead of loading the files?