pub struct CpuTrainArgs {
pub dim: usize,
pub lr: f32,
pub epochs: usize,
pub neg: usize,
pub window: usize,
pub lr_update_rate: usize,
pub n_threads: usize,
pub verbose: bool,
pub sample: f32,
}Expand description
Train arguments for CPU implementation.
§Fields
dim- Dimension of the embedding vectors.lr- Learning rate.epochs- Number of epochs to train.neg- Number of negative samples to use.window- Window size for context words.lr_update_rate- Learning rate update rate.n_threads- Number of threads to use.verbose- Whether to print progress.sample- Subsampling threshold; nodes with frequency above this are randomly dropped during training.
Fields§
§dim: usize§lr: f32§epochs: usize§neg: usize§window: usize§lr_update_rate: usize§n_threads: usize§verbose: bool§sample: f32Trait Implementations§
Source§impl Clone for CpuTrainArgs
impl Clone for CpuTrainArgs
Source§fn clone(&self) -> CpuTrainArgs
fn clone(&self) -> CpuTrainArgs
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 moreAuto Trait Implementations§
impl Freeze for CpuTrainArgs
impl RefUnwindSafe for CpuTrainArgs
impl Send for CpuTrainArgs
impl Sync for CpuTrainArgs
impl Unpin for CpuTrainArgs
impl UnsafeUnpin for CpuTrainArgs
impl UnwindSafe for CpuTrainArgs
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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