mlx_rs::transforms

Function grad

Source
pub fn grad<'a, F, Args, Output, Err>(
    f: F,
    argument_numbers: impl IntoOption<&'a [i32]>,
) -> impl FnMut(Args) -> Result<Output> + 'a
where F: IntoGrad<'a, Args, Output, Err>,
Expand description

Returns a function which computes the gradient of f.