Creating nonoverlapping patches from 3D data and reshape them back to the image

In your last topic, I’ve posted a small example, how to get non-overlapping patches: link.

Have a look at this post to see, how these patches can be transformed into the original input tensor.

Note, that your current input shape it not divisible without a remainder by 32, so you might want to add padding to the input before unfolding.