Function autograd::ops::minimum
[−]
[src]
pub fn minimum(a: &Tensor, b: &Tensor) -> Tensor
Returns the min of x and y (i.e. x > y ? y : x) element-wise.
extern crate ndarray; extern crate autograd as ag; let mut ctx = ag::Context::new(); let ref a = ag::constant(ndarray::arr1(&[1., 2., 3.]), &mut ctx); let ref b = ag::constant(ndarray::arr1(&[3., 2., 1.]), &mut ctx); let ref c = ag::minimum(a, b); assert_eq!(c.eval(&mut ctx), ndarray::arr1(&[1., 2., 1.]).into_dyn());