Function dfdx::tensor_ops::matmul
source · [−]pub fn matmul<const M: usize, const N: usize, const O: usize, H: Tape>(
lhs: Tensor2D<M, N, H>,
rhs: &Tensor2D<N, O, NoTape>
) -> Tensor2D<M, O, H>
Expand description
Matrix multiplication.
Arguments
lhs
- a 2d tensor representing a MxN matrixrhs
- a 2d tensor representing a NxO matrix
Returns a 2d tensor representing an MxO matrix.
Examples
let x: Tensor2D<3, 2> = Tensor2D::zeros();
let y: Tensor2D<2, 4> = Tensor2D::zeros();
let result: Tensor2D<3, 4> = matmul(x, &y);