I’m using two index values in __getitem__  to create a batch:
data, labels, img_path = train_data.__getitem__(i, i + batch_size)
where I will be able to access image file names, so indices are just for batch slicing
the total number of images is around 80k (currently wikiart dataset, but later i will have to use 300k+ set of images) so I’m not able to keep the whole set of images together in memory, and I’m trying to find the most efficient way to load them by batches
my_vars it’s just all my variables that I am deleting after use (but it’s still not enough)
and seems like Im not able to use batch > 80 ( but when I load images with datasets.ImageFolder without image file names, I can easily use batch size 300 for example )