Solved by RoySadaka in post #2 
              
              
                For future reference, iv’e managed to re-fold it, here is the solution I came up with: 
#forward
start = torch.rand((2,3,64,64))
forward1 = start.unfold(2,16,16)
forward2 = forward1.unfold(3,16,16)
forward3 = forward2.flatten(start_dim=4, end_dim=5)
forward4 = forward3.flatten(start_dim=2, end_dim=3…