pub struct BestModelCheckpoint { /* private fields */ }Expand description
Saves model weights when monitored metric improves.
This struct tracks the best metric value and signals when a new best is found. The caller is responsible for performing the actual model serialisation.
Implementations§
Source§impl BestModelCheckpoint
impl BestModelCheckpoint
Source§impl BestModelCheckpoint
impl BestModelCheckpoint
Sourcepub fn with_monitor(self, key: impl Into<String>) -> Self
pub fn with_monitor(self, key: impl Into<String>) -> Self
Set the metric key to monitor (default: "loss").
Trait Implementations§
Source§impl Clone for BestModelCheckpoint
impl Clone for BestModelCheckpoint
Source§fn clone(&self) -> BestModelCheckpoint
fn clone(&self) -> BestModelCheckpoint
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 moreSource§impl Debug for BestModelCheckpoint
impl Debug for BestModelCheckpoint
Source§impl TrainingCallback for BestModelCheckpoint
impl TrainingCallback for BestModelCheckpoint
Auto Trait Implementations§
impl Freeze for BestModelCheckpoint
impl RefUnwindSafe for BestModelCheckpoint
impl Send for BestModelCheckpoint
impl Sync for BestModelCheckpoint
impl Unpin for BestModelCheckpoint
impl UnsafeUnpin for BestModelCheckpoint
impl UnwindSafe for BestModelCheckpoint
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> 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