pub enum FewShotAlgorithm {
Prototypical,
Matching,
MamlAdaptation,
DistanceWeightedKnn,
}Expand description
Few-shot learning algorithm to apply when predicting a query.
All four variants share the same fit/predict surface so callers can
swap algorithms without touching surrounding code. See the module-level
documentation for a brief overview of each algorithm’s semantics.
Variants§
Prototypical
Prototypical Networks — class prototypes via the mean embedding of each performance-quantile bucket.
Matching
Matching Networks — attention-weighted nearest neighbours over the entire support set.
MamlAdaptation
MAML-style fast adaptation on a linear adapter (one weight per embedding dimension plus a bias).
DistanceWeightedKnn
Distance-weighted KNN regression over the k_shot closest support
points.
Trait Implementations§
Source§impl Clone for FewShotAlgorithm
impl Clone for FewShotAlgorithm
impl Copy for FewShotAlgorithm
Source§impl Debug for FewShotAlgorithm
impl Debug for FewShotAlgorithm
Source§impl<'de> Deserialize<'de> for FewShotAlgorithm
impl<'de> Deserialize<'de> for FewShotAlgorithm
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
impl Eq for FewShotAlgorithm
Source§impl Hash for FewShotAlgorithm
impl Hash for FewShotAlgorithm
Source§impl PartialEq for FewShotAlgorithm
impl PartialEq for FewShotAlgorithm
Source§impl Serialize for FewShotAlgorithm
impl Serialize for FewShotAlgorithm
impl StructuralPartialEq for FewShotAlgorithm
Auto Trait Implementations§
impl Freeze for FewShotAlgorithm
impl RefUnwindSafe for FewShotAlgorithm
impl Send for FewShotAlgorithm
impl Sync for FewShotAlgorithm
impl Unpin for FewShotAlgorithm
impl UnsafeUnpin for FewShotAlgorithm
impl UnwindSafe for FewShotAlgorithm
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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