It should not show 12,000 but 12,500. In the tutorial the batchsize is set to 4 and the loader gives the number of batches not the number of samples as it’s length. therefore you have 50,000 train images divided by batchsize 4 = 12,500 batches.