pub struct MTLConfig {
pub architecture: MTLArchitecture,
pub loss_balancing: LossBalancingStrategy,
pub tasks: Vec<TaskConfig>,
pub use_task_embeddings: bool,
pub task_embedding_dim: usize,
pub use_auxiliary_tasks: bool,
pub auxiliary_tasks: Vec<AuxiliaryTaskConfig>,
pub task_clustering: Option<TaskClusteringConfig>,
pub evaluation_frequency: usize,
pub use_task_scheduling: bool,
pub task_scheduling: TaskSchedulingStrategy,
}Expand description
Configuration for multi-task learning
Fields§
§architecture: MTLArchitectureMulti-task learning architecture
loss_balancing: LossBalancingStrategyStrategy for balancing losses across tasks
tasks: Vec<TaskConfig>Task configurations
use_task_embeddings: boolWhether to use task embeddings
task_embedding_dim: usizeTask embedding dimension
use_auxiliary_tasks: boolWhether to use auxiliary tasks
auxiliary_tasks: Vec<AuxiliaryTaskConfig>Auxiliary task configurations
task_clustering: Option<TaskClusteringConfig>Task clustering configuration
evaluation_frequency: usizeEvaluation frequency for each task
use_task_scheduling: boolWhether to use task scheduling
task_scheduling: TaskSchedulingStrategyTask scheduling strategy
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MTLConfig
impl<'de> Deserialize<'de> for MTLConfig
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 MTLConfig
impl RefUnwindSafe for MTLConfig
impl Send for MTLConfig
impl Sync for MTLConfig
impl Unpin for MTLConfig
impl UnsafeUnpin for MTLConfig
impl UnwindSafe for MTLConfig
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> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
Source§fn save_to_file(&self, path: &Path) -> Result<(), TrustformersError>
fn save_to_file(&self, path: &Path) -> Result<(), TrustformersError>
Save to file
Source§fn load_from_file(path: &Path) -> Result<Self, TrustformersError>where
Self: Sized,
fn load_from_file(path: &Path) -> Result<Self, TrustformersError>where
Self: Sized,
Load from file
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