Solved by mattrobin in post #2 
              
              
                I solved the problem. The problem was because the dataset was listed as only having a length of the same size as the batch size. And it seems the DataLoader will “hand out” remaining dataset indexes left to be processed to its workers. When the batch size is the dataset length, then only 1 process w…