Function autograd::ops::concat [] [src]

pub fn concat(tensors: &[&Tensor], axis: isize) -> Tensor

Concatenates input tensors along specified axis.

axis can be negative.

extern crate autograd as ag;

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

assert_eq!(d.eval(&mut ctx).shape(), &[9, 2]);