pub trait ApplyGradient<Delta> {
type Elem;
type Output;
// Required methods
fn apply_gradient(
&mut self,
grad: &Delta,
lr: Self::Elem,
) -> Result<Self::Output>;
fn apply_gradient_with_decay(
&mut self,
grad: &Delta,
lr: Self::Elem,
decay: Self::Elem,
) -> Result<Self::Output>;
}Expand description
A trait declaring basic gradient-related routines for a neural network