Solved by ptrblck in post #2 
              
              
                You could create multiple ImageFolders for training, validation, and testing, and pass the corresponding transformation to each of these. 
Once these datasets are created, you could reuse the SubsetRandomSampler approach and create the DataLoaders. 
Since ImageFolder will load the data lazily, you s…