pub struct MetaStats {
pub meta_losses: Vec<f64>,
pub task_losses: Vec<Vec<f64>>,
pub iterations: usize,
}Expand description
Meta-learning statistics tracker.
Fields§
§meta_losses: Vec<f64>Meta-training losses over time.
task_losses: Vec<Vec<f64>>Task adaptation losses.
iterations: usizeNumber of meta-iterations completed.
Implementations§
Source§impl MetaStats
impl MetaStats
Sourcepub fn record_meta_step(&mut self, meta_loss: f64)
pub fn record_meta_step(&mut self, meta_loss: f64)
Record a meta-training step.
Sourcepub fn record_task_adaptation(&mut self, task_id: usize, losses: Vec<f64>)
pub fn record_task_adaptation(&mut self, task_id: usize, losses: Vec<f64>)
Record task adaptation.
Sourcepub fn avg_meta_loss(&self, last_n: usize) -> f64
pub fn avg_meta_loss(&self, last_n: usize) -> f64
Get average meta-loss over last N steps.
Sourcepub fn is_improving(&self, window: usize) -> bool
pub fn is_improving(&self, window: usize) -> bool
Check if meta-training is improving (loss decreasing).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetaStats
impl RefUnwindSafe for MetaStats
impl Send for MetaStats
impl Sync for MetaStats
impl Unpin for MetaStats
impl UnwindSafe for MetaStats
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