pub struct TrainingConfig {
pub max_steps: usize,
pub eval_interval: usize,
pub learning_rate: f64,
pub min_learning_rate: f64,
pub warmup_steps: usize,
pub weight_decay: f64,
pub beta1: f64,
pub beta2: f64,
pub epsilon: f64,
pub grad_clip: f64,
}Fields§
§max_steps: usize§eval_interval: usize§learning_rate: f64§min_learning_rate: f64§warmup_steps: usize§weight_decay: f64§beta1: f64§beta2: f64§epsilon: f64§grad_clip: f64Implementations§
Source§impl TrainingConfig
impl TrainingConfig
Sourcepub fn with_max_steps(self, max_steps: usize) -> Self
pub fn with_max_steps(self, max_steps: usize) -> Self
Set the default value for the field.
Sourcepub fn with_eval_interval(self, eval_interval: usize) -> Self
pub fn with_eval_interval(self, eval_interval: usize) -> Self
Set the default value for the field.
Sourcepub fn with_learning_rate(self, learning_rate: f64) -> Self
pub fn with_learning_rate(self, learning_rate: f64) -> Self
Set the default value for the field.
Sourcepub fn with_min_learning_rate(self, min_learning_rate: f64) -> Self
pub fn with_min_learning_rate(self, min_learning_rate: f64) -> Self
Set the default value for the field.
Sourcepub fn with_warmup_steps(self, warmup_steps: usize) -> Self
pub fn with_warmup_steps(self, warmup_steps: usize) -> Self
Set the default value for the field.
Sourcepub fn with_weight_decay(self, weight_decay: f64) -> Self
pub fn with_weight_decay(self, weight_decay: f64) -> Self
Set the default value for the field.
Sourcepub fn with_beta1(self, beta1: f64) -> Self
pub fn with_beta1(self, beta1: f64) -> Self
Set the default value for the field.
Sourcepub fn with_beta2(self, beta2: f64) -> Self
pub fn with_beta2(self, beta2: f64) -> Self
Set the default value for the field.
Sourcepub fn with_epsilon(self, epsilon: f64) -> Self
pub fn with_epsilon(self, epsilon: f64) -> Self
Set the default value for the field.
Sourcepub fn with_grad_clip(self, grad_clip: f64) -> Self
pub fn with_grad_clip(self, grad_clip: f64) -> Self
Set the default value for the field.
Source§impl TrainingConfig
impl TrainingConfig
pub fn validate(&self) -> Result<(), TrainingError>
Trait Implementations§
Source§impl Clone for TrainingConfig
impl Clone for TrainingConfig
Source§impl Config for TrainingConfig
impl Config for TrainingConfig
Source§fn load<P>(file: P) -> Result<Self, ConfigError>
fn load<P>(file: P) -> Result<Self, ConfigError>
Loads the configuration from a file. Read more
Source§fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
Loads the configuration from a binary buffer. Read more
Source§impl Debug for TrainingConfig
impl Debug for TrainingConfig
Source§impl<'de> Deserialize<'de> for TrainingConfig
impl<'de> Deserialize<'de> for TrainingConfig
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
Source§impl Display for TrainingConfig
impl Display for TrainingConfig
Source§impl PartialEq for TrainingConfig
impl PartialEq for TrainingConfig
Source§impl Serialize for TrainingConfig
impl Serialize for TrainingConfig
impl StructuralPartialEq for TrainingConfig
Auto Trait Implementations§
impl Freeze for TrainingConfig
impl RefUnwindSafe for TrainingConfig
impl Send for TrainingConfig
impl Sync for TrainingConfig
impl Unpin for TrainingConfig
impl UnsafeUnpin for TrainingConfig
impl UnwindSafe for TrainingConfig
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