MetricSchedulerTrait

Trait MetricSchedulerTrait 

Source
pub trait MetricSchedulerTrait<F: Float + Debug + Display + FromPrimitive> {
    // Required methods
    fn step_with_metric(&mut self, metric: F) -> F;
    fn get_learning_rate(&self) -> F;
    fn reset(&mut self);
    fn set_mode(&mut self, mode: OptimizationMode);
}
Expand description

Trait for external scheduler integration

This trait can be implemented by external schedulers (like those in scirs2-optim) to provide seamless integration with metrics.

Required Methods§

Source

fn step_with_metric(&mut self, metric: F) -> F

Update the scheduler with a new metric value

Source

fn get_learning_rate(&self) -> F

Get the current learning rate

Source

fn reset(&mut self)

Reset the scheduler to initial state

Source

fn set_mode(&mut self, mode: OptimizationMode)

Set the mode (minimize or maximize)

Implementors§