Disclaimer: I know there are a couple questions already like this, however none of them seems to get my problem covered.
My goal is simply to extract image patches. The following should make it clear. Consider the following sketch.
patches1705×741 7.36 KB

I want to seperate my image into e.g. 4 patches and have each patch have all the channels in it.
For example given an image 3x8x8 I want to have the patches tensor to be 4x(4 * 4 * 3) → 4x48
Any ideas for a general applicable code?