oa::ml::nn::VectorQuantizerConfig

Configuration for one EMA-trained vector-quantization codebook.

StRust public API

Declaration

pub struct VectorQuantizerConfig { pub num_codes: usize, pub code_dim: usize, pub commitment_beta: f32, pub ema_decay: f32, pub ema_epsilon: f32, pub dead_threshold: f32, pub normalize_codes: bool, }
Public Rust declaration.

Public Methods

fn clone(&self) -> VectorQuantizerConfig
fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn eq(&self, other: &VectorQuantizerConfig) -> bool

Associated Functions

fn default() -> Self

Public Data Members

num_codesusizefield
code_dimusizefield
commitment_betaf32field
ema_decayf32field
ema_epsilonf32field
dead_thresholdf32field
normalize_codesboolfield

Public Method Documentation

fn clone( &self ) -> VectorQuantizerConfig
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
fn eq( &self, other: &VectorQuantizerConfig ) -> bool
No public source comment is attached to this declaration.
fn default() -> Self
No public source comment is attached to this declaration.