pub struct EarlyStopping { /* private fields */ }Expand description
Early stopping
Implementations§
Source§impl EarlyStopping
impl EarlyStopping
pub fn new() -> Self
Sourcepub fn stopping_criteria(&self) -> &StoppingCriteria
pub fn stopping_criteria(&self) -> &StoppingCriteria
Return a reference to the stopping criteria.
Sourcepub fn stopping_criteria_mut(&mut self) -> &mut StoppingCriteria
pub fn stopping_criteria_mut(&mut self) -> &mut StoppingCriteria
Return a mutable reference to the stopping criteria.
Sourcepub fn patience(&self) -> u32
pub fn patience(&self) -> u32
Return the configured patience (number of epochs without improvement).
Sourcepub fn set_patience(&mut self, patience: u32)
pub fn set_patience(&mut self, patience: u32)
Set the patience.
Sourcepub fn set_min_delta(&mut self, min_delta: f64)
pub fn set_min_delta(&mut self, min_delta: f64)
Set the minimum delta.
Sourcepub fn restore_best_weights(&self) -> bool
pub fn restore_best_weights(&self) -> bool
Return whether best weights should be restored after early stopping.
Sourcepub fn set_restore_best_weights(&mut self, restore: bool)
pub fn set_restore_best_weights(&mut self, restore: bool)
Set whether to restore best weights.
Auto Trait Implementations§
impl Freeze for EarlyStopping
impl RefUnwindSafe for EarlyStopping
impl Send for EarlyStopping
impl Sync for EarlyStopping
impl Unpin for EarlyStopping
impl UnsafeUnpin for EarlyStopping
impl UnwindSafe for EarlyStopping
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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