Function value_and_grad_with_argnums

Source
pub fn value_and_grad_with_argnums<'a, F, Err>(
    f: F,
    argnums: impl IntoOption<&'a [i32]>,
) -> impl FnMut(&[Array]) -> Result<(Vec<Array>, Vec<Array>)> + 'a
where F: IntoValueAndGrad<'a, Err> + 'a,
Expand description

Returns a function which computes the value and gradient of f.

See also value_and_grad for a version that uses the default argument numbers &[0].