Solved by ptrblck in post #2 
              
              
                The easiest way would be to use torchvision.ImageFolder. This class uses assigns different classes to your folders. 
The DataLoder class wraps the Dataset and provides more functionalities like multi-processed loading, shuffling and batching. 
Here is an example how your code might look like: 
data_…