Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

torch_mm

Mm


Description

Mm

Usage

torch_mm(self, mat2)

Arguments

self

(Tensor) the first matrix to be multiplied

mat2

(Tensor) the second matrix to be multiplied

mm(input, mat2, out=NULL) -> Tensor

Performs a matrix multiplication of the matrices input and mat2.

If input is a (n \times m) tensor, mat2 is a (m \times p) tensor, out will be a (n \times p) tensor.

Note

This function does not broadcast . For broadcasting matrix products, see torch_matmul.

Examples

if (torch_is_installed()) {

mat1 = torch_randn(c(2, 3))
mat2 = torch_randn(c(3, 3))
torch_mm(mat1, mat2)
}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.