pub struct CentroidOTConfig {
pub dim: usize,
pub num_centroids: usize,
pub kmeans_iterations: usize,
pub temperature: f32,
pub sinkhorn_reg: f32,
pub sinkhorn_iterations: usize,
pub seed: u64,
}Expand description
Configuration for Centroid OT Attention
Fields§
§dim: usizeModel dimension
num_centroids: usizeNumber of centroids (16-32 typical)
kmeans_iterations: usizeNumber of k-means iterations
temperature: f32Temperature for softmax
sinkhorn_reg: f32Regularization for Sinkhorn (0.1 typical)
sinkhorn_iterations: usizeMax Sinkhorn iterations
seed: u64Random seed
Trait Implementations§
Source§impl Clone for CentroidOTConfig
impl Clone for CentroidOTConfig
Source§fn clone(&self) -> CentroidOTConfig
fn clone(&self) -> CentroidOTConfig
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 CentroidOTConfig
impl Debug for CentroidOTConfig
Source§impl Default for CentroidOTConfig
impl Default for CentroidOTConfig
Source§impl<'de> Deserialize<'de> for CentroidOTConfig
impl<'de> Deserialize<'de> for CentroidOTConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CentroidOTConfig
impl RefUnwindSafe for CentroidOTConfig
impl Send for CentroidOTConfig
impl Sync for CentroidOTConfig
impl Unpin for CentroidOTConfig
impl UnwindSafe for CentroidOTConfig
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