pub struct Hyperparameters {
pub learning_rate: Option<f32>,
pub batch_size: Option<usize>,
pub epochs: Option<usize>,
pub optimizer: Option<String>,
pub custom: HashMap<String, String>,
}Expand description
Hyperparameters for training
Fields§
§learning_rate: Option<f32>Learning rate
batch_size: Option<usize>Batch size
epochs: Option<usize>Number of epochs
optimizer: Option<String>Optimizer name
custom: HashMap<String, String>Additional parameters
Implementations§
Source§impl Hyperparameters
impl Hyperparameters
Sourcepub fn with_learning_rate(self, lr: f32) -> Self
pub fn with_learning_rate(self, lr: f32) -> Self
Set learning rate
Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Set batch size
Sourcepub fn with_epochs(self, epochs: usize) -> Self
pub fn with_epochs(self, epochs: usize) -> Self
Set epochs
Sourcepub fn with_optimizer(self, optimizer: String) -> Self
pub fn with_optimizer(self, optimizer: String) -> Self
Set optimizer
Trait Implementations§
Source§impl Clone for Hyperparameters
impl Clone for Hyperparameters
Source§fn clone(&self) -> Hyperparameters
fn clone(&self) -> Hyperparameters
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 Hyperparameters
impl Debug for Hyperparameters
Source§impl Default for Hyperparameters
impl Default for Hyperparameters
Source§impl<'de> Deserialize<'de> for Hyperparameters
impl<'de> Deserialize<'de> for Hyperparameters
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 Hyperparameters
impl RefUnwindSafe for Hyperparameters
impl Send for Hyperparameters
impl Sync for Hyperparameters
impl Unpin for Hyperparameters
impl UnwindSafe for Hyperparameters
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