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 mut ctx = ag::Context::new();
let ref x = ag::constant(ndarray::arr2(&[[2., 2.], [3., 3.]]), &mut ctx);
let ref y = ag::tile(x, 0, 2);

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