Solved by imaluengo in post #2 
              
              
                It is going to try to concatenate across dimension 2 – but dimension numbers, as tensor indexes  start at 0 in PyTorch. Thus dim=2 refers to the 3rd dimension, and your tensors are only 2-dimensional.