Function autograd::ops::matmul[][src]

pub fn matmul<A: AsRef<Tensor>, B: AsRef<Tensor>>(a: A, b: B) -> Tensor

Matrix multiplication.

Both a and b must be 2-ranked tensors.

extern crate autograd as ag;

let ref a = ag::zeros(&[4, 2]);
let ref b = ag::zeros(&[2, 3]);
let ref c = ag::matmul(a, b);

assert_eq!(c.eval(&[]).unwrap().shape(), &[4, 3]);