Solved by ptrblck in post #2 
              
              
                Each worker in the DataLoader will create a batch by calling into Dataset.__getitem__ with the corresponding index and will add the batch to the queue. 
It depends on your use case, if using a DataLoader (with multiple workers) would yield a speedup. 
E.g. if you are preloading the entire dataset, a…