pub struct LinearCurriculum {
pub start_percentage: f64,
pub sort_by_difficulty: bool,
}Expand description
Linear curriculum: gradually increase the percentage of samples used.
Starts with a small percentage of easiest samples and linearly increases to use all samples by the end of training.
Fields§
§start_percentage: f64Initial percentage of samples to use (0.0 to 1.0).
sort_by_difficulty: boolWhether to sort by difficulty (true) or use all samples (false).
Implementations§
Source§impl LinearCurriculum
impl LinearCurriculum
Sourcepub fn new(start_percentage: f64) -> TrainResult<Self>
pub fn new(start_percentage: f64) -> TrainResult<Self>
Create a new linear curriculum.
§Arguments
start_percentage- Initial percentage of samples (e.g., 0.1 for 10%)
Sourcepub fn without_sorting(self) -> Self
pub fn without_sorting(self) -> Self
Disable sorting by difficulty (use random subset instead).
Trait Implementations§
Source§impl Clone for LinearCurriculum
impl Clone for LinearCurriculum
Source§fn clone(&self) -> LinearCurriculum
fn clone(&self) -> LinearCurriculum
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CurriculumStrategy for LinearCurriculum
impl CurriculumStrategy for LinearCurriculum
Source§fn select_samples(
&self,
epoch: usize,
total_epochs: usize,
difficulties: &ArrayView1<'_, f64>,
) -> TrainResult<Vec<usize>>
fn select_samples( &self, epoch: usize, total_epochs: usize, difficulties: &ArrayView1<'_, f64>, ) -> TrainResult<Vec<usize>>
Get the subset of samples to use for the current training step. Read more
Source§impl Debug for LinearCurriculum
impl Debug for LinearCurriculum
Auto Trait Implementations§
impl Freeze for LinearCurriculum
impl RefUnwindSafe for LinearCurriculum
impl Send for LinearCurriculum
impl Sync for LinearCurriculum
impl Unpin for LinearCurriculum
impl UnwindSafe for LinearCurriculum
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