Solved by ptrblck in post #2 
              
              
                The number of samples in your Dataset cannot be divided by the batch size without a remainder. 
Therefore, your last batch will contain less samples then specified by batch_size. 
If you want to get rid of this batch, use drop_last=True in your DataLoader.