Function autograd::ops::batch_matmul [] [src]

pub fn batch_matmul(a: &Tensor, b: &Tensor) -> Tensor

Batched matrix multiplication.

The rank of a and b must be equals.

extern crate autograd as ag;

let mut ctx = ag::Context::new();
let ref a = ag::zeros(&[2, 3, 4, 2]);
let ref b = ag::zeros(&[2, 3, 2, 3]);
let ref c = ag::batch_matmul(a, b);

assert_eq!(c.eval(&mut ag::Context::new()).shape(), &[2, 3, 4, 3]);

For detailed description, see https://www.tensorflow.org/api_docs/python/tf/matmul