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>)> + 'awhere
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]
.