pub struct LrRangeTestAnalyzer {
pub learning_rates: Vec<f64>,
pub losses: Vec<f64>,
}Expand description
Learning rate range test analyzer for finding optimal learning rates.
Fields§
§learning_rates: Vec<f64>Learning rates tested
losses: Vec<f64>Losses observed at each learning rate
Implementations§
Source§impl LrRangeTestAnalyzer
impl LrRangeTestAnalyzer
Sourcepub fn new(learning_rates: Vec<f64>, losses: Vec<f64>) -> TrainResult<Self>
pub fn new(learning_rates: Vec<f64>, losses: Vec<f64>) -> TrainResult<Self>
Create a new analyzer.
Sourcepub fn suggest_lr(&self) -> Option<f64>
pub fn suggest_lr(&self) -> Option<f64>
Find the learning rate with the steepest loss decrease.
Sourcepub fn lr_at_min_loss(&self) -> Option<f64>
pub fn lr_at_min_loss(&self) -> Option<f64>
Find the learning rate at minimum loss.
Sourcepub fn plot_ascii(&self, width: usize, height: usize) -> String
pub fn plot_ascii(&self, width: usize, height: usize) -> String
Plot the LR range test results (returns a simple ASCII plot).
Trait Implementations§
Source§impl Clone for LrRangeTestAnalyzer
impl Clone for LrRangeTestAnalyzer
Source§fn clone(&self) -> LrRangeTestAnalyzer
fn clone(&self) -> LrRangeTestAnalyzer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LrRangeTestAnalyzer
impl RefUnwindSafe for LrRangeTestAnalyzer
impl Send for LrRangeTestAnalyzer
impl Sync for LrRangeTestAnalyzer
impl Unpin for LrRangeTestAnalyzer
impl UnwindSafe for LrRangeTestAnalyzer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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