Extract patches from image

Good morning. I’ve a dataset with monochromatic images with 4096x256 pixel and I would like to split them in many patches of size 16x16. Every image is a tensor:
torch.Size([1, 256, 4096])
How can I do?

I believe this is a classic use case where Tensor.unfold can be used: