Struct MetricEarlyStoppingStrategy
pub struct MetricEarlyStoppingStrategy { /* private fields */ }Expand description
An early stopping strategy based on a metrics collected during training or validation.
Implementations§
§impl MetricEarlyStoppingStrategy
impl MetricEarlyStoppingStrategy
pub fn new<Me>(
metric: &Me,
aggregate: Aggregate,
direction: Direction,
split: Split,
condition: StoppingCondition,
) -> MetricEarlyStoppingStrategywhere
Me: Metric,
pub fn new<Me>(
metric: &Me,
aggregate: Aggregate,
direction: Direction,
split: Split,
condition: StoppingCondition,
) -> MetricEarlyStoppingStrategywhere
Me: Metric,
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§
§impl Clone for MetricEarlyStoppingStrategy
impl Clone for MetricEarlyStoppingStrategy
§fn clone(&self) -> MetricEarlyStoppingStrategy
fn clone(&self) -> MetricEarlyStoppingStrategy
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 more§impl EarlyStoppingStrategy for MetricEarlyStoppingStrategy
impl EarlyStoppingStrategy for MetricEarlyStoppingStrategy
§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
§impl<T> CloneEarlyStoppingStrategy for T
impl<T> CloneEarlyStoppingStrategy for T
§fn clone_box(&self) -> Box<dyn CloneEarlyStoppingStrategy>
fn clone_box(&self) -> Box<dyn CloneEarlyStoppingStrategy>
Clone into a boxed trait object.
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