Mm
torch_mm(self, mat2)
self
: (Tensor) the first matrix to be multipliedmat2
: (Tensor) the second matrix to be multipliedThis function does not broadcast . For broadcasting matrix products, see torch_matmul
.
Performs a matrix multiplication of the matrices input
and mat2
.
If input
is a tensor, mat2
is a tensor, out
will be a tensor.
if (torch_is_installed()) { mat1 = torch_randn(c(2, 3)) mat2 = torch_randn(c(3, 3)) torch_mm(mat1, mat2) }
Useful links