Solved by ptrblck in post #5 
              
              
                The DataLoader itself will not mutate the Dataset, as it’s calling into the Dataset to get the data, create batches, shuffle etc. 
However, the Dataset.__getitem__ could mutate the data in case you are manipulating it inplace (this is usually not wanted and caused errors in the past). 
There is also…