Multiplication in PyTorch

1. Element-wise Multiplication

*

torch.Tensor.mul()

torch.mul()

 

2. Matrix Multiplication

torch.Tensor.matmul()

torch.matmul()

torch.Tensor.mm()

torch.mm()

 

3. Batch Matrix Multiplication

torch.bmm()

torch.bmm(out_theta.transpose(1, 2), out_phi)

  

posted @ 2019-04-01 16:48  leizhao  阅读(299)  评论(0编辑  收藏  举报