title: matrix product of the two tensors
body: <p>How would you calculate matrix product of the two tensors in PyTorch?</p>
  
  <pre><code>x =  torch.Tensor([[1, 2, 3], [1, 2, 3]]).view(-1, 2)
  y =  torch.Tensor([[2, 1]]).view(2, -1)
  </code></pre>
  
  <p>I am confused between these options.</p>
  
  <p><a href="https://i.stack.imgur.com/OI1FS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OI1FS.png" alt="enter image description here"></a></p>