Solved by ptrblck in post #2 
              
              
                One approach would be to create separate DataLoaders with batch_size=5 (small dataset) and =27 (large dataset), respectively. 
In the outer loop you would iterate the large dataset to make sure you are sampling all data points. 
You could create an iterator for the small dataset via small_iter = ite…