pub struct DistillationConfig {Show 13 fields
pub loss: DistillationLoss,
pub temperature: Temperature,
pub epochs: usize,
pub learning_rate: f32,
pub batch_size: usize,
pub alpha: f32,
pub optimizer: OptimizerType,
pub lr_schedule: LearningRateSchedule,
pub early_stopping: Option<EarlyStopping>,
pub gradient_clip: Option<f32>,
pub validation_split: f32,
pub num_classes: usize,
pub seed: u64,
}Expand description
Knowledge distillation configuration
Fields§
§loss: DistillationLossDistillation loss function
temperature: TemperatureTemperature for softening
epochs: usizeNumber of training epochs
learning_rate: f32Learning rate
batch_size: usizeBatch size
alpha: f32Alpha weight for distillation loss (1 - alpha for hard label loss)
optimizer: OptimizerTypeOptimizer type
lr_schedule: LearningRateScheduleLearning rate schedule
early_stopping: Option<EarlyStopping>Early stopping configuration
gradient_clip: Option<f32>Gradient clipping threshold (None = no clipping)
validation_split: f32Validation split ratio (0.0 to 0.3)
num_classes: usizeNumber of classes for classification
seed: u64Random seed for reproducibility
Implementations§
Trait Implementations§
Source§impl Clone for DistillationConfig
impl Clone for DistillationConfig
Source§fn clone(&self) -> DistillationConfig
fn clone(&self) -> DistillationConfig
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 Debug for DistillationConfig
impl Debug for DistillationConfig
Auto Trait Implementations§
impl Freeze for DistillationConfig
impl RefUnwindSafe for DistillationConfig
impl Send for DistillationConfig
impl Sync for DistillationConfig
impl Unpin for DistillationConfig
impl UnsafeUnpin for DistillationConfig
impl UnwindSafe for DistillationConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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