Function autograd::ops::reduce_prod
[−]
[src]
pub fn reduce_prod<T: ArrayLike>(
x: &Tensor,
axes: &T,
keep_dims: bool
) -> Tensor
Takes product along specified axes.
Elements of axes
can be negative.
extern crate ndarray; extern crate autograd as ag; let ref x = ag::constant(ndarray::arr2(&[[2., 4.], [3., 1.]])); let ref y = ag::reduce_prod(&x, &[1], false); assert_eq!(y.eval(&[]), Ok(ndarray::arr1(&[8., 3.]).into_dyn()));