Skip to main content

CurriculumScheduler

Trait CurriculumScheduler 

Source
pub trait CurriculumScheduler: Send {
    // Required methods
    fn difficulty(&self) -> f32;
    fn tier(&self) -> usize;
    fn step(&mut self, epoch: usize, accuracy: f32);
    fn reset(&mut self);
    fn name(&self) -> &str;

    // Provided methods
    fn sample_weight(&self, sample_difficulty: f32) -> f32 { ... }
    fn include_sample(&self, sample_difficulty: f32) -> bool { ... }
}
Expand description

Trait for curriculum learning schedulers

Determines training difficulty/tier based on training progress.

Required Methods§

Source

fn difficulty(&self) -> f32

Get the current difficulty level (0.0 = easiest, 1.0 = hardest)

Source

fn tier(&self) -> usize

Get the current tier (for tiered training like CITL)

Source

fn step(&mut self, epoch: usize, accuracy: f32)

Advance the curriculum based on training progress

Source

fn reset(&mut self)

Reset the curriculum to initial state

Source

fn name(&self) -> &str

Name of the curriculum scheduler

Provided Methods§

Source

fn sample_weight(&self, sample_difficulty: f32) -> f32

Get sample weight for a given difficulty score

Returns weight multiplier for loss (1.0 = normal weight)

Source

fn include_sample(&self, sample_difficulty: f32) -> bool

Check if sample should be included at current difficulty

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§