pub struct DistillationStats {
pub initial_accuracy: f32,
pub final_accuracy: f32,
pub teacher_accuracy: f32,
pub compression_ratio: f32,
pub train_loss_history: Vec<f32>,
pub val_loss_history: Vec<f32>,
pub train_acc_history: Vec<f32>,
pub val_acc_history: Vec<f32>,
pub epochs_trained: usize,
pub final_learning_rate: f32,
}Expand description
Distillation training statistics
Fields§
§initial_accuracy: f32Initial student accuracy
final_accuracy: f32Final student accuracy
teacher_accuracy: f32Teacher accuracy (target)
compression_ratio: f32Model compression ratio
train_loss_history: Vec<f32>Training loss history per epoch
val_loss_history: Vec<f32>Validation loss history per epoch
train_acc_history: Vec<f32>Training accuracy history per epoch
val_acc_history: Vec<f32>Validation accuracy history per epoch
epochs_trained: usizeNumber of epochs trained
final_learning_rate: f32Final learning rate
Implementations§
Source§impl DistillationStats
impl DistillationStats
Sourcepub fn accuracy_improvement(&self) -> f32
pub fn accuracy_improvement(&self) -> f32
Returns the accuracy improvement
Sourcepub fn accuracy_gap(&self) -> f32
pub fn accuracy_gap(&self) -> f32
Returns the accuracy gap with teacher
Sourcepub fn is_successful(&self) -> bool
pub fn is_successful(&self) -> bool
Checks if distillation was successful (< 5% accuracy gap)
Sourcepub fn best_val_loss(&self) -> f32
pub fn best_val_loss(&self) -> f32
Returns the best validation loss
Sourcepub fn final_train_loss(&self) -> f32
pub fn final_train_loss(&self) -> f32
Returns the final training loss
Trait Implementations§
Source§impl Clone for DistillationStats
impl Clone for DistillationStats
Source§fn clone(&self) -> DistillationStats
fn clone(&self) -> DistillationStats
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 moreAuto Trait Implementations§
impl Freeze for DistillationStats
impl RefUnwindSafe for DistillationStats
impl Send for DistillationStats
impl Sync for DistillationStats
impl Unpin for DistillationStats
impl UnsafeUnpin for DistillationStats
impl UnwindSafe for DistillationStats
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