Function dfdx::tensor_ops::vecmat_mul_transpose
source · [−]pub fn vecmat_mul_transpose<const K: usize, const N: usize, TAPE: Tape>(
lhs: Tensor1D<K, TAPE>,
rhs_t: &Tensor2D<N, K, NoneTape>
) -> Tensor1D<N, TAPE>
Expand description
vector * matrix multiplication where rhs
is transposed. y * transpose(rhs)
Arguments
lhs
- a 1d tensor representing a 1xK matrixrhs_t
- a 2d tensor representing a NxK matrix
Generics
K
: number of columns oflhs
and number of rows ofrhs
.N
: Number of columns ofrhs
.
Returns a 1d tensor representing an 1xO matrix.
Examples
let x: Tensor1D<2> = Tensor1D::zeros();
let y: Tensor2D<4, 2> = Tensor2D::zeros();
let result: Tensor1D<4> = vecmat_mul_transpose(x, &y);