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)                                                              
Out[18]: tensor([[0.7928]])

In [19]: a.mm(b.T)                                                              
Out[19]: 
tensor([[0.2572, 0.3554, 0.0888, 0.1154],
        [0.2528, 0.3493, 0.0873, 0.1134],
        [0.4203, 0.5808, 0.1451, 0.1886],
        [0.0919, 0.1270, 0.0317, 0.0412]])