pub struct MetaTrainingReport {
pub iterations: usize,
pub initial_meta_loss: f64,
pub final_meta_loss: f64,
pub loss_history: Vec<f64>,
pub initial_validation_loss: Option<f64>,
pub final_validation_loss: Option<f64>,
pub validation_history: Vec<f64>,
pub selection_metric: SelectionMetric,
pub gradient_norms: Vec<f64>,
pub weight_count: usize,
}Expand description
What a meta-training run measured.
Every field is an observation, not a target: final_meta_loss is the value the
kept weights actually achieve on the training tasks, and Self::improved is
the honest answer to “did this help”, judged by whichever criterion
Self::selection_metric names.
Fields§
§iterations: usizeES iterations completed.
initial_meta_loss: f64Training meta-loss of the weights the trainer started from.
final_meta_loss: f64Training meta-loss of the weights the trainer kept.
loss_history: Vec<f64>Training meta-loss after each iteration, in order.
initial_validation_loss: Option<f64>Validation meta-loss of the starting weights, if validation tasks were supplied.
final_validation_loss: Option<f64>Validation meta-loss of the weights the trainer kept.
validation_history: Vec<f64>Validation meta-loss after each iteration, if validation tasks were supplied.
selection_metric: SelectionMetricWhich loss chose the kept weights.
gradient_norms: Vec<f64>Euclidean norm of the estimated meta-gradient at each iteration.
weight_count: usizeNumber of learned weights being optimized.
Implementations§
Source§impl MetaTrainingReport
impl MetaTrainingReport
Sourcepub fn improved(&self) -> bool
pub fn improved(&self) -> bool
Whether the run left the optimizer better than it found it, judged by the selection metric.
§This is weaker than it sounds under SelectionMetric::TrainingLoss
With no validation tasks there is nothing to compare the training loss
against, so improved() == true means only “it fits the training tasks
better” — which is exactly what an overfitting run also reports. The NTM
controller was measured driving its training meta-loss down ~30% while
making a held-out task 40x worse; that run returns true here, and under
TrainingLoss Self::relative_improvement and
Self::relative_training_improvement are the same number, so the report
carries no signal that separates the two cases.
To get a claim about generalisation, train through
EsMetaTrainer::train_with_validation: the metric becomes
SelectionMetric::ValidationLoss, and the gap between
relative_improvement() and relative_training_improvement() becomes the
overfitting measurement. Check Self::selection_metric before trusting
this method as a generalisation result.
Sourcepub fn relative_improvement(&self) -> f64
pub fn relative_improvement(&self) -> f64
Fractional reduction in the selection metric (negative if training made it worse).
Sourcepub fn relative_training_improvement(&self) -> f64
pub fn relative_training_improvement(&self) -> f64
Fractional reduction in the training meta-loss specifically.
Comparing this against Self::relative_improvement under
SelectionMetric::ValidationLoss is how a caller sees overfitting: a
large training improvement next to a small validation one means the run
specialised to the training family.
Trait Implementations§
Source§impl Clone for MetaTrainingReport
impl Clone for MetaTrainingReport
Auto Trait Implementations§
impl Freeze for MetaTrainingReport
impl RefUnwindSafe for MetaTrainingReport
impl Send for MetaTrainingReport
impl Sync for MetaTrainingReport
impl Unpin for MetaTrainingReport
impl UnsafeUnpin for MetaTrainingReport
impl UnwindSafe for MetaTrainingReport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.