The tensors you’re putting into cat are only 1D and you’re trying to concatenate them along dim=1 i.e. dimension 2. If you give 0 to cat it will work ok. Remember that python is 0-based.
I’m not sure why does it work for regular tensors, I’ll need to look into that, but I think it’s an unintended behaviour.