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