pub struct MetricEarlyStoppingStrategy { /* private fields */ }Expand description
An early stopping strategy based on a metrics collected during training or validation.
Implementations§
Source§impl MetricEarlyStoppingStrategy
impl MetricEarlyStoppingStrategy
Sourcepub fn new<Me: Metric>(
aggregate: Aggregate,
direction: Direction,
split: Split,
condition: StoppingCondition,
) -> Self
pub fn new<Me: Metric>( aggregate: Aggregate, direction: Direction, split: Split, condition: StoppingCondition, ) -> Self
Create a new early stopping strategy based on a metrics collected during training or validation.
§Notes
The metric should be registered for early stopping to work, otherwise no data is collected.
Trait Implementations§
Source§impl EarlyStoppingStrategy for MetricEarlyStoppingStrategy
impl EarlyStoppingStrategy for MetricEarlyStoppingStrategy
Source§fn should_stop(&mut self, epoch: usize, store: &EventStoreClient) -> bool
fn should_stop(&mut self, epoch: usize, store: &EventStoreClient) -> bool
Update its current state and returns if the training should be stopped.
Auto Trait Implementations§
impl Freeze for MetricEarlyStoppingStrategy
impl RefUnwindSafe for MetricEarlyStoppingStrategy
impl Send for MetricEarlyStoppingStrategy
impl Sync for MetricEarlyStoppingStrategy
impl Unpin for MetricEarlyStoppingStrategy
impl UnwindSafe for MetricEarlyStoppingStrategy
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