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