pub struct OptimizationConfig {
pub lr_schedule: LearningRateSchedule,
pub initial_lr: f64,
pub final_lr: f64,
pub use_momentum: bool,
pub momentum: f64,
pub use_adam: bool,
pub adam_beta1: f64,
pub adam_beta2: f64,
pub adam_epsilon: f64,
pub l2_regularization: f64,
pub gradient_clip: Option<f64>,
pub use_hierarchical_softmax: bool,
}Expand description
Advanced optimization techniques for embeddings
Fields§
§lr_schedule: LearningRateScheduleLearning rate schedule type
initial_lr: f64Initial learning rate
final_lr: f64Final learning rate
use_momentum: boolUse momentum optimization
momentum: f64Momentum factor (0.9 is typical)
use_adam: boolUse Adam optimizer
adam_beta1: f64Adam beta1 parameter
adam_beta2: f64Adam beta2 parameter
adam_epsilon: f64Adam epsilon parameter
l2_regularization: f64L2 regularization strength
gradient_clip: Option<f64>Gradient clipping threshold
use_hierarchical_softmax: boolUse hierarchical softmax instead of negative sampling
Trait Implementations§
Source§impl Clone for OptimizationConfig
impl Clone for OptimizationConfig
Source§fn clone(&self) -> OptimizationConfig
fn clone(&self) -> OptimizationConfig
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 OptimizationConfig
impl Debug for OptimizationConfig
Auto Trait Implementations§
impl Freeze for OptimizationConfig
impl RefUnwindSafe for OptimizationConfig
impl Send for OptimizationConfig
impl Sync for OptimizationConfig
impl Unpin for OptimizationConfig
impl UnwindSafe for OptimizationConfig
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