pub struct Data2VecConfig {
pub mask_ratio: f32,
pub momentum: f32,
pub beta: f32,
pub normalize_targets: bool,
pub top_k_average: usize,
}Expand description
Hyper-parameters for the data2vec training objective.
Fields§
§mask_ratio: f32Fraction of tokens to mask (default 0.65, paper canonical for vision).
momentum: f32EMA coefficient for the teacher network (default 0.999).
beta: f32Huber loss threshold β (default 2.0).
normalize_targets: boolWhether to L2-normalise teacher representations per feature dimension
across the batch/token axis before computing the loss (default true).
top_k_average: usizeNumber of teacher layer outputs to average for target computation (default 1; set > 1 to enable a rolling exponential history buffer).
Trait Implementations§
Source§impl Clone for Data2VecConfig
impl Clone for Data2VecConfig
Source§fn clone(&self) -> Data2VecConfig
fn clone(&self) -> Data2VecConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Data2VecConfig
impl Debug for Data2VecConfig
Auto Trait Implementations§
impl Freeze for Data2VecConfig
impl RefUnwindSafe for Data2VecConfig
impl Send for Data2VecConfig
impl Sync for Data2VecConfig
impl Unpin for Data2VecConfig
impl UnsafeUnpin for Data2VecConfig
impl UnwindSafe for Data2VecConfig
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