Is there a PyTorch tensor function that reduces dimension in regular patterns
Sorry for the poor wording of the title. What I wanted to do is like this:

Matrix 1 is the original matrix, and matrix 2 is matrix 1 but with every even columns and rows taken out. Matrix 3 is matrix 1 but only has 1 (mod 3) columns and rows. Matrix 4 is the same, with 1 (mod 4) columns and rows. Matrix 5 has 1 (mod 2) columns and all rows.

Is there a PyTorch function that manipulates tensors in this way that is fast and can utilize the GPU? This is sort of like MaxPool2d, however I just need the first value and not the max. If there aren't any functions like that, is there a way to do it manually but still fast?

Matrix 5 is the easiest to show, because you only need to slice along one dimension. But you can slice along both to get the other results. 

matrix5 = matrix1[, ::2]


This notation takes every second column, starting at the zeroth.
