OptimizerState

Trait OptimizerState 

Source
pub trait OptimizerState<Input, Output, M: OptimizableModel<Input, Output>> {
    // Required method
    fn update_weights(&mut self, model: &mut M) -> Result<(), ModelError>;

    // Provided method
    fn initialize(&self) { ... }
}
Expand description

OptimizerState trait defines the interface for managing the state of an optimizer. It provides methods to initialize the optimizer state and update the model weights. This trait is useful to implement custom parameter update rules, as used in different optimization algorithms, like RMSProp, Adam, etc.

Required Methods§

Source

fn update_weights(&mut self, model: &mut M) -> Result<(), ModelError>

Provided Methods§

Implementors§