That’s normal if the number of samples isn’t a multiple of the batch size. What you can do is either use partial mini-batches or shuffle the dataset at each epoch, so that samples you ignored at one epoch will likely be used in the following ones. Also, have a look at DataLoader, that simplifies some of these things for you.