Mm
Note
This function does not broadcast .
For broadcasting matrix products, see torch_matmul
.
mm(input, mat2, out=NULL) -> Tensor
Performs a matrix multiplication of the matrices input
and mat2
.
If input
is a mat2
is a
out
will be a
Examples
if (torch_is_installed()) {
mat1 = torch_randn(c(2, 3))
mat2 = torch_randn(c(3, 3))
torch_mm(mat1, mat2)
}
#> torch_tensor
#> -1.2333 0.4991 -0.3110
#> 2.8295 -1.6874 0.0501
#> [ CPUFloatType{2,3} ]