pub trait Regularizer<A, D>{
// Required methods
fn apply(
&self,
params: &Array<A, D>,
gradients: &mut Array<A, D>,
) -> Result<A>;
fn penalty(&self, params: &Array<A, D>) -> Result<A>;
}Expand description
Trait for regularizers that can be applied to parameters and gradients
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".