pub struct CurriculumLearning { /* private fields */ }Expand description
Curriculum learning trainer
Implementations§
Source§impl CurriculumLearning
impl CurriculumLearning
Sourcepub fn new(config: CurriculumConfig) -> Self
pub fn new(config: CurriculumConfig) -> Self
Create new curriculum learning trainer
Sourcepub fn initialize_samples(&mut self, num_samples: usize, difficulties: Vec<f32>)
pub fn initialize_samples(&mut self, num_samples: usize, difficulties: Vec<f32>)
Initialize sample difficulties
Sourcepub fn update_threshold(&mut self)
pub fn update_threshold(&mut self)
Update difficulty threshold for current epoch
Sourcepub fn select_samples(&self) -> Vec<usize>
pub fn select_samples(&self) -> Vec<usize>
Select samples for current curriculum stage
Sourcepub fn update_sample_losses(&mut self, indices: &[usize], losses: &[f32])
pub fn update_sample_losses(&mut self, indices: &[usize], losses: &[f32])
Update sample losses after training step
Sourcepub fn update_performance(&mut self, performance: f32)
pub fn update_performance(&mut self, performance: f32)
Update performance history
Sourcepub fn next_epoch(&mut self)
pub fn next_epoch(&mut self)
Advance to next epoch
Sourcepub fn get_stats(&self) -> CurriculumStats
pub fn get_stats(&self) -> CurriculumStats
Get current statistics
Auto Trait Implementations§
impl Freeze for CurriculumLearning
impl RefUnwindSafe for CurriculumLearning
impl Send for CurriculumLearning
impl Sync for CurriculumLearning
impl Unpin for CurriculumLearning
impl UnwindSafe for CurriculumLearning
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> 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