pub struct ModalityConfig {
pub modality_type: ModalityType,
pub input_dim: usize,
pub preprocessor: Option<ModalityPreprocessor>,
pub fusion_weight: f32,
}Expand description
Configuration for a single modality
Fields§
§modality_type: ModalityTypeType of modality
input_dim: usizeExpected input dimension
preprocessor: Option<ModalityPreprocessor>Optional preprocessor
fusion_weight: f32Weight for fusion (used in weighted fusion)
Implementations§
Source§impl ModalityConfig
impl ModalityConfig
Sourcepub fn new(modality_type: ModalityType, input_dim: usize) -> Self
pub fn new(modality_type: ModalityType, input_dim: usize) -> Self
Create a new modality configuration
Sourcepub fn preprocessor(self, preprocessor: ModalityPreprocessor) -> Self
pub fn preprocessor(self, preprocessor: ModalityPreprocessor) -> Self
Set the preprocessor
Sourcepub fn fusion_weight(self, weight: f32) -> Self
pub fn fusion_weight(self, weight: f32) -> Self
Set the fusion weight
Trait Implementations§
Source§impl Clone for ModalityConfig
impl Clone for ModalityConfig
Source§fn clone(&self) -> ModalityConfig
fn clone(&self) -> ModalityConfig
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 moreAuto Trait Implementations§
impl Freeze for ModalityConfig
impl !RefUnwindSafe for ModalityConfig
impl Send for ModalityConfig
impl Sync for ModalityConfig
impl Unpin for ModalityConfig
impl !UnwindSafe for ModalityConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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