I believe you have a typo in your question, the two tensors are [423, 2] and [423, 8].
Here’s a link that may help:

  
      stackoverflow.com
  
  
      
    
  

  Concatenating two tensors with different dimensions in Pytorch 5



  python, pytorch



  asked by
  
  
    adeelz92
  
  on 10:16AM - 19 May 18 UTC


  
  
    
    
  
  


You might have to change the ‘dim’ of the example.