Skip to main content

gradient

Function gradient 

Source
pub fn gradient(f: impl Fn(&[Dual]) -> Dual, xs: &[f64]) -> Vec<f64>
Expand description

Compute the full gradient of f: Rⁿ → R at xs.

Makes n forward passes, one per variable.