How to divide an image into blocks of pixels using pytorch?
I’ve downloaded the EMNIST dataset of letters, and I’ve converted each image to a torch.tensor
object with shape torch.size([28, 28])
. However, I would like divide the 28*28 image into 7*7 blocks, with each block sized 16.