I assume you were using tensor.unfold to create the patches.
If that’s the case, nn.Fold should be working as it’s the reverting operation to nn.Unfold.
Where are you currently stuck and what have you tried so far?