pub trait IntoKeyedValueAndGrad<'a, Arr, Args, Err>{
// Required method
fn into_keyed_value_and_grad(
self,
) -> impl FnMut(KeyedParameters<Arr>, Args) -> Result<(Vec<Array>, KeyedGrad)> + 'a;
}
Expand description
Similar to [IntoValueAndGrad
] but for functions that take a hashmap of parameters.
Required Methods§
Sourcefn into_keyed_value_and_grad(
self,
) -> impl FnMut(KeyedParameters<Arr>, Args) -> Result<(Vec<Array>, KeyedGrad)> + 'a
fn into_keyed_value_and_grad( self, ) -> impl FnMut(KeyedParameters<Arr>, Args) -> Result<(Vec<Array>, KeyedGrad)> + 'a
Convert the function/closure into a closure that computes the value and gradient.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.