Inverse of tensor.fold

Hello,
I want to cut a big image into patches, so I am doing the following:

tensor_img.shape
>> torch.Size([3, 1536, 2048])

tensor_img = tensor_img.unfold(1, 128, 128).unfold(2, 128, 128)
tensor_img.shape
>> torch.Size([3, 12, 16, 128, 128])

How do I recover the original image?
A simple tensor_img.view(3, 1536, 2048) does not work, as it gives me a “wrong strided” image.

Note: I am trying to make inference on to large for memory images, so wanted to chop them down, and feed them as tiles, then reconstruct the output.

Thanks, i was hoping for a more elegant solution with some crazy nice operator.