pub struct TrainingResult {
pub train_losses: Vec<f32>,
pub val_losses: Vec<Option<f32>>,
pub best_epoch: usize,
pub best_val_loss: Option<f32>,
pub epochs_trained: usize,
pub final_train_loss: f32,
}Expand description
Summary of a completed training run.
Fields§
§train_losses: Vec<f32>Train loss at the end of every epoch.
val_losses: Vec<Option<f32>>Validation loss at the end of every epoch (None if no validation set).
best_epoch: usizeIndex of the epoch that produced the best validation loss.
best_val_loss: Option<f32>The best validation loss observed, or None if no validation was run.
epochs_trained: usizeNumber of epochs actually trained (may be less than max_epochs due to
early stopping).
final_train_loss: f32Training loss on the final epoch.
Trait Implementations§
Source§impl Clone for TrainingResult
impl Clone for TrainingResult
Source§fn clone(&self) -> TrainingResult
fn clone(&self) -> TrainingResult
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 TrainingResult
impl Debug for TrainingResult
Source§impl<'de> Deserialize<'de> for TrainingResult
impl<'de> Deserialize<'de> for TrainingResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TrainingResult
impl RefUnwindSafe for TrainingResult
impl Send for TrainingResult
impl Sync for TrainingResult
impl Unpin for TrainingResult
impl UnsafeUnpin for TrainingResult
impl UnwindSafe for TrainingResult
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