Function dfdx::tensor_ops::vecmat_mul
source · [−]pub fn vecmat_mul<const N: usize, const O: usize, H: TapeHolder>(
lhs: Tensor1D<N, H>,
rhs: &Tensor2D<N, O, NoTape>
) -> Tensor1D<O, H>
Expand description
vector * matrix multiplication.
Arguments
lhs
- a 1d tensor representing a 1xN matrixrhs
- a 2d tensor representing a NxO matrix
Returns a 1d tensor representing an 1xO matrix.
Examples
let x: Tensor1D<2> = Tensor1D::zeros();
let y: Tensor2D<2, 4> = Tensor2D::zeros();
let result: Tensor1D<4> = vecmat_mul(x, &y);