oa::ml::optim::Optimizer

Common behavior exposed by an OA optimizer to training policy. This contract deliberately excludes captured-program and persistence internals. Those capabilities depend on optimizer-specific state and are admitted separately only when their complete implementation exists.

TrRust public API

Declaration

pub trait Optimizer { // Required methods fn zero_grad(&self); fn step(&mut self) -> Result<()>; fn learning_rate(&self) -> f32; fn set_learning_rate(&mut self, learning_rate: f32) -> Result<()>; fn step_count(&self) -> u64; fn belongs_to(&self, engine: &Engine) -> bool; }
Public Rust declaration.

Public Methods

fn zero_grad(&self)
fn step(&mut self) -> Result<()>
fn learning_rate(&self) -> f32
fn set_learning_rate(&mut self, learning_rate: f32) -> Result<()>
fn step_count(&self) -> u64
fn belongs_to(&self, engine: &Engine) -> bool

Public Method Documentation

fn zero_grad( &self )
No public source comment is attached to this declaration.
fn step(&mut self) -> Result<()>
No public source comment is attached to this declaration.
fn learning_rate( &self ) -> f32
No public source comment is attached to this declaration.
fn set_learning_rate(&mut self, learning_rate: f32) -> Result<()>
No public source comment is attached to this declaration.
fn step_count( &self ) -> u64
No public source comment is attached to this declaration.
fn belongs_to( &self, engine: &Engine ) -> bool
No public source comment is attached to this declaration.