[−][src]Function autograd::ops::shape
pub fn shape<T: Float, A: AsRef<Tensor<T>>>(x: A) -> Tensor<T>
Returns the (symbolic) shape of input tensor
extern crate autograd as ag; let ref x: ag::Tensor<f32> = ag::zeros(&[2, 3]); let ref s = ag::shape(x); assert_eq!(&[2., 3.], s.eval(&[]).unwrap().as_slice().unwrap());