pub struct CurriculumManager { /* private fields */ }Expand description
Manager for curriculum learning that tracks training progress.
Implementations§
Source§impl CurriculumManager
impl CurriculumManager
Sourcepub fn new<S: CurriculumStrategy + Clone + 'static>(strategy: S) -> Self
pub fn new<S: CurriculumStrategy + Clone + 'static>(strategy: S) -> Self
Sourcepub fn compute_difficulty(
&mut self,
key: &str,
data: &Array2<f64>,
labels: &Array2<f64>,
predictions: Option<&Array2<f64>>,
) -> TrainResult<()>
pub fn compute_difficulty( &mut self, key: &str, data: &Array2<f64>, labels: &Array2<f64>, predictions: Option<&Array2<f64>>, ) -> TrainResult<()>
Compute and cache difficulty scores.
§Arguments
key- Cache key (e.g., “train”, “val”)data- Training datalabels- Training labelspredictions- Optional model predictions
Sourcepub fn get_selected_samples(
&self,
key: &str,
total_epochs: usize,
) -> TrainResult<Vec<usize>>
pub fn get_selected_samples( &self, key: &str, total_epochs: usize, ) -> TrainResult<Vec<usize>>
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the difficulty cache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CurriculumManager
impl !RefUnwindSafe for CurriculumManager
impl !Send for CurriculumManager
impl !Sync for CurriculumManager
impl Unpin for CurriculumManager
impl !UnwindSafe for CurriculumManager
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