Function autograd::ops::zeros [] [src]

pub fn zeros<T: ArrayLike>(shape: &T) -> Tensor

Returns zeros with given shape

extern crate ndarray;
extern crate autograd as ag;

let a = ag::zeros(&[4, 2]);
assert_eq!(a.eval(&mut ag::Context::new()), ndarray::Array2::<f32>::zeros((4, 2)).into_dyn());