Struct burn::train::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>(
aggregate: Aggregate,
direction: Direction,
split: Split,
condition: StoppingCondition,
) -> MetricEarlyStoppingStrategywhere
Me: Metric,
pub fn new<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 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 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