Solved by Hong_Cheng in post #4 
              
              
                I think you should reshape your tensor first. 
**convert your tensor as shape of ** (4,1) and (1,4) 

In [16]: a = torch.rand((4,1))                                                  

In [17]: b = torch.rand((4,1))                                                  

In [18]: b.T.mm(a)                …