Solved by Nikronic in post #2 
              
              
                Hi, 
You can define your own custom dataset class easily to handle this kind of situations. 
Here is the top-level structure of the class your can implement: 

class PlacesDataset(Dataset):
  def __init__():
     # initialize variables such is path to csv file and images and transforms
  def __len__…