Solved by RoySadaka in post #4 
              
              
                Hmm, I believe the official Dataloader has some logic regarding to indexing (like you mentioned), maybe also depends on if you set shuffle=True/False ,sampler, etc, but I always add an extra guard with modulo operation ("%") even if it is redundant. 
I recommend reading the official guide to have a …