pub struct TrainConfig {Show 16 fields
pub dataset_path: PathBuf,
pub output_model_path: PathBuf,
pub resume_model_path: Option<PathBuf>,
pub steps: usize,
pub batch_size: i64,
pub seq_len: i64,
pub grad_accum_steps: usize,
pub lr: f64,
pub weight_decay: f64,
pub beta1: f64,
pub beta2: f64,
pub adam_eps: f64,
pub seed: u64,
pub device: Option<String>,
pub validate_roundtrip_path: Option<PathBuf>,
pub model_cfg: TrainModelConfig,
}Fields§
§dataset_path: PathBuf§output_model_path: PathBuf§resume_model_path: Option<PathBuf>§steps: usize§batch_size: i64§seq_len: i64§grad_accum_steps: usize§lr: f64§weight_decay: f64§beta1: f64§beta2: f64§adam_eps: f64§seed: u64§device: Option<String>§validate_roundtrip_path: Option<PathBuf>§model_cfg: TrainModelConfigTrait Implementations§
Source§impl Clone for TrainConfig
impl Clone for TrainConfig
Source§fn clone(&self) -> TrainConfig
fn clone(&self) -> TrainConfig
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 TrainConfig
impl Debug for TrainConfig
Auto Trait Implementations§
impl Freeze for TrainConfig
impl RefUnwindSafe for TrainConfig
impl Send for TrainConfig
impl Sync for TrainConfig
impl Unpin for TrainConfig
impl UnwindSafe for TrainConfig
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