pub struct TrainConfig {
pub batch_size: usize,
pub n_negatives: usize,
pub temperature: f32,
pub learning_rate: f32,
pub flush_threshold: usize,
}Expand description
Configuration for contrastive learning training
Fields§
§batch_size: usizeBatch size for training
n_negatives: usizeNumber of negative samples per positive
temperature: f32Temperature parameter for contrastive loss
learning_rate: f32Learning rate for optimization
flush_threshold: usizeNumber of updates before flushing to storage
Trait 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