How to stick a list of block tensors to form a larger tensor

Hi,
Assume that there is a list of small tensors (say 16 blocks), and it is desired to stick these small tensors along dimension 2, 3 to create a larger 2D image.

torch.split() is available for partition the tensor to smaller blocks, is there any operation for the opposite task?

Thanks

I think you are looking for nn.Fold.
Could you check the docs and see if that would work for you?

2 Likes

Thanks for your reply. Yes, that’s what I was looking for.