the code is working fine you got confused.
first the file size is 28*28 pixel which equals 784. the tensor showing torch.Size([100, 784]) it tells that it is loading 100 images of size 784 in one iteration (iteration means one loop inside the data loader) the 600 that is printing is the no. of loop(iteration) it went through to complete the data in dataloader. so you see the dataloader is loading 100 images at one time. hope this clarifies your confusion