Solved by Bled_Clement in post #3 
              
              
                I solved the issue and was able to create a 2D sliding window which seamlessly stitched the image back together in the end. 
I used ptrblck’s response on this post and adapted my tensor to work. I changed my image from [256, 256] to standard shape B x C x H x W (1 x 1 x 256 x 256). Then I unfolded u…