mlx_rs::transforms

Function keyed_value_and_grad

Source
pub fn keyed_value_and_grad<'a, F, Arr, Args, Err>(
    f: F,
) -> impl FnMut(KeyedParameters<Arr>, Args) -> Result<(Vec<Array>, KeyedGrad)> + 'a
where F: IntoKeyedValueAndGrad<'a, Arr, Args, Err> + 'a, Arr: AsRef<Array>, Args: Clone,
Expand description

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