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,
) -> MetricEarlyStoppingStrategy
where
Me: Metric,
pub fn new<Me>(
metric: &Me,
aggregate: Aggregate,
direction: Direction,
split: Split,
condition: StoppingCondition,
) -> MetricEarlyStoppingStrategy
where
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 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> 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
more
Source§
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