Solved by god_sp33d in post #2 
              
              
                I guess it is because the total number of samples is not divisible by the batch_size. So, when you are creating the DataLoader there is this argument drop_last. This is by default set to False. Try changing it to True.