Solved by crcrpar in post #2 
              
              
                Hi 
It would be enough to define your original torch.utils.data.DataSet subclass to handle 8 folders simultaneously. I write down one naive not complete example below. 
Let the folder structure be 
- train
    - folder_1
    - ...
    - folder_8

In the above setting, you can list all the image file…