How can I increase the size of MNIST?

The size of MNIST is (1,28,28), but I would like to change this to (1,30,375). What should I do? Which should I fill in the enlarged part with 0 or 1?

You could resize the images using transforms.Resize.

If you want to pad the images only, I would fill the padding with zeros as it’s representing the background.