Function autograd::ops::tile [] [src]

pub fn tile(x: &Tensor, axis: isize, num: usize) -> Tensor

Tiles input tensor along specified axis.

Tiles input tensor num times along axis. axis can be negative.

extern crate ndarray;
extern crate autograd as ag;

let ref x = ag::constant(ndarray::arr2(&[[2., 2.], [3., 3.]]));
let ref y = ag::tile(x, 0, 2);

assert_eq!(
    y.eval(&[]),
    Ok(ndarray::arr2(&[[2., 2.], [3., 3.], [2., 2.], [3., 3.]]).into_dyn())
);