pub struct OptimizerAnalyzer { /* private fields */ }Expand description
Optimizer state analyzer for debugging and diagnostics
Implementations§
Source§impl OptimizerAnalyzer
impl OptimizerAnalyzer
Sourcepub fn new(config: Option<AnalyzerConfig>) -> Self
pub fn new(config: Option<AnalyzerConfig>) -> Self
Create a new optimizer analyzer
Sourcepub fn analyze_step(
&mut self,
step: usize,
params: &[Arc<RwLock<Tensor>>],
learning_rates: &[f32],
loss: Option<f32>,
) -> Result<()>
pub fn analyze_step( &mut self, step: usize, params: &[Arc<RwLock<Tensor>>], learning_rates: &[f32], loss: Option<f32>, ) -> Result<()>
Analyze a single optimization step
Sourcepub fn generate_report(&self) -> AnalysisReport
pub fn generate_report(&self) -> AnalysisReport
Generate a comprehensive analysis report
Sourcepub fn get_gradient_flow_data(&self, num_steps: usize) -> Vec<GradientFlowPoint>
pub fn get_gradient_flow_data(&self, num_steps: usize) -> Vec<GradientFlowPoint>
Get recent gradient flow visualization data
Auto Trait Implementations§
impl Freeze for OptimizerAnalyzer
impl RefUnwindSafe for OptimizerAnalyzer
impl Send for OptimizerAnalyzer
impl Sync for OptimizerAnalyzer
impl Unpin for OptimizerAnalyzer
impl UnsafeUnpin for OptimizerAnalyzer
impl UnwindSafe for OptimizerAnalyzer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more