Solved by imaluengo in post #8 
              
              
                That is why I was adding the second example @bhanu. If you are iterating over the dataset: 
for image, labels in dataloader:
    pass

You are ensured that the dataloader will visit EVERY single image (a full epoch). If you want to make your training iterations shorter than epochs, then you could do…