Concatenate the tensors within the tensors - Pytorch

Hi Vishak,

To understand the problem, you have a Tensor with this dim [B, N, X, Y], where B=Batch size, N=Length of the data, and X, Y=dim of your input.

The issue that you are trying to solve is that every N-element has a different X, Y size.

If that is the problem and the issue that you are having, I would suggest padding using pad_sequence module, so every N-element has a constant size which is the max size in your dataset. Look into this post for more information.

Then, you will be using the stack module to stack those tensors on the second dimension.