pub struct TrainerConfig {
pub optimizer: OptimizerKind,
pub loss: LossKind,
pub epochs: usize,
pub batch_size: usize,
pub validation_split: Option<f32>,
}Expand description
High-level training configuration.
Fields§
§optimizer: OptimizerKind§loss: LossKind§epochs: usize§batch_size: usize§validation_split: Option<f32>Optional fraction of data to hold out for validation (e.g. 0.2 = 20%).
When None, no validation is performed.
Trait Implementations§
Source§impl Clone for TrainerConfig
impl Clone for TrainerConfig
Source§fn clone(&self) -> TrainerConfig
fn clone(&self) -> TrainerConfig
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 TrainerConfig
impl Debug for TrainerConfig
Source§impl Default for TrainerConfig
impl Default for TrainerConfig
Source§impl PartialEq for TrainerConfig
impl PartialEq for TrainerConfig
impl StructuralPartialEq for TrainerConfig
Auto Trait Implementations§
impl Freeze for TrainerConfig
impl RefUnwindSafe for TrainerConfig
impl Send for TrainerConfig
impl Sync for TrainerConfig
impl Unpin for TrainerConfig
impl UnsafeUnpin for TrainerConfig
impl UnwindSafe for TrainerConfig
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