pub enum SharingStrategy {
HardSharing {
shared_layers: usize,
task_specific_layers: Vec<usize>,
},
SoftSharing {
l2_penalty: f64,
similarity_threshold: f64,
},
CrossStitch {
num_units: Vec<usize>,
},
AttentionSharing {
attention_dim: usize,
},
}Expand description
Multi-task learning strategies for parameter sharing
Variants§
HardSharing
Hard parameter sharing: shared backbone, task-specific heads
Fields
Number of shared bottom layers before task-specific heads branch off
SoftSharing
Soft parameter sharing: task-specific networks with regularization
Fields
CrossStitch
Cross-stitch networks: linear combinations of task-specific features
AttentionSharing
Attention-based sharing: learn what to share between tasks
Trait Implementations§
Source§impl Clone for SharingStrategy
impl Clone for SharingStrategy
Source§fn clone(&self) -> SharingStrategy
fn clone(&self) -> SharingStrategy
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 SharingStrategy
impl Debug for SharingStrategy
Source§impl Default for SharingStrategy
impl Default for SharingStrategy
Source§impl PartialEq for SharingStrategy
impl PartialEq for SharingStrategy
impl StructuralPartialEq for SharingStrategy
Auto Trait Implementations§
impl Freeze for SharingStrategy
impl RefUnwindSafe for SharingStrategy
impl Send for SharingStrategy
impl Sync for SharingStrategy
impl Unpin for SharingStrategy
impl UnsafeUnpin for SharingStrategy
impl UnwindSafe for SharingStrategy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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