pub struct MetaOptimizationTracker<T: Float + Debug + Send + Sync + 'static> { /* private fields */ }Expand description
Meta-optimization tracker.
Records what meta-training actually did: how many epochs ran, how many tasks were consumed, the loss trajectory, and the best parameters seen.
Implementations§
Source§impl<T: Float + Debug + Send + Sync + 'static + Default + Clone> MetaOptimizationTracker<T>
impl<T: Float + Debug + Send + Sync + 'static + Default + Clone> MetaOptimizationTracker<T>
pub fn new() -> Self
Sourcepub fn record_epoch(
&mut self,
_epoch: usize,
training_result: &TrainingResult,
validation_result: &ValidationResult,
tasks_in_epoch: usize,
) -> Result<()>
pub fn record_epoch( &mut self, _epoch: usize, training_result: &TrainingResult, validation_result: &ValidationResult, tasks_in_epoch: usize, ) -> Result<()>
Record one meta-training epoch. tasks_in_epoch is the number of tasks
the epoch actually consumed.
pub fn update_best_parameters( &mut self, metaparameters: &MetaParameters<T>, ) -> Result<()>
Sourcepub fn best_parameters(&self) -> Option<&MetaParameters<T>>
pub fn best_parameters(&self) -> Option<&MetaParameters<T>>
The best meta-parameters recorded so far, if any.
Sourcepub fn epochs_recorded(&self) -> usize
pub fn epochs_recorded(&self) -> usize
Number of epochs recorded.
Sourcepub fn total_tasks_seen(&self) -> usize
pub fn total_tasks_seen(&self) -> usize
Number of tasks actually consumed across all recorded epochs.
Sourcepub fn adaptation_efficiency(&self) -> T
pub fn adaptation_efficiency(&self) -> T
Mean training-loss improvement per epoch.
Returns zero until at least two epochs have been recorded, because a single epoch provides no improvement to measure.
Sourcepub fn validation_losses(&self) -> &[f64]
pub fn validation_losses(&self) -> &[f64]
Validation loss trajectory (one entry per recorded epoch).
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for MetaOptimizationTracker<T>
impl<T> RefUnwindSafe for MetaOptimizationTracker<T>
impl<T> Send for MetaOptimizationTracker<T>
impl<T> Sync for MetaOptimizationTracker<T>
impl<T> Unpin for MetaOptimizationTracker<T>
impl<T> UnsafeUnpin for MetaOptimizationTracker<T>
impl<T> UnwindSafe for MetaOptimizationTracker<T>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.