FewTUREOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.MetaLearning.Options
Configuration options for FewTURE (Few-shot Transformer with Uncertainty and Reliable Estimation) (Hiller et al., ECCV 2022).
Inheritance: ModelOptions → FewTUREOptions<T, TInput, TOutput>
Implements: IMetaLearnerOptions<T>
For Beginners
FewTURE combines transformers with uncertainty:
- Uses a Vision Transformer (ViT) to get patch-level features (tokens)
- Matches queries to support classes at the token/patch level
- Estimates uncertainty for each prediction
- Uncertain predictions are treated more carefully during classification
This is like comparing puzzle pieces: instead of comparing whole images, compare individual patches and aggregate the evidence.
How It Works
FewTURE uses vision transformers with token-level local features and uncertainty estimation for few-shot classification. It operates on patch tokens from a ViT backbone.
Reference: Hiller, M., Ma, R., Harber, M., & Ommer, B. (2022). Rethinking Generalization in Few-Shot Classification. ECCV 2022.
Constructors
| Constructor | Summary |
|---|---|
FewTUREOptions(IFullModel<T, TInput, TOutput> metaModel) |
Initializes a new instance of FewTUREOptions. |
Properties
| Property | Summary |
|---|---|
FewTUREUncertaintyMethod UncertaintyMethod { get; set; } |
Gets or sets the uncertainty estimation method. |
IEpisodicDataLoader<T, TInput, TOutput> DataLoader { get; set; } |
Gets or sets the episodic data loader. |
IFullModel<T, TInput, TOutput> MetaModel { get; set; } |
Gets or sets the feature extractor model. |
IGradientBasedOptimizer<T, TInput, TOutput> InnerOptimizer { get; set; } |
Must stay null: this algorithm takes no plain gradient inner step (it adapts without one, or by its own update rule), so a supplied optimizer is rejected when the learner is built. |
IGradientBasedOptimizer<T, TInput, TOutput> MetaOptimizer { get; set; } |
Optimizer for the meta-update. |
ILossFunction<T> LossFunction { get; set; } |
Loss function for meta-training; null uses the default multi-class classification loss. |
bool EnableCheckpointing { get; set; } |
|
bool UseFirstOrder { get; set; } |
|
double InnerLearningRate { get; set; } |
|
double OuterLearningRate { get; set; } |
|
double UncertaintyThreshold { get; set; } |
Gets or sets the uncertainty threshold for reliable estimation. |
double? GradientClipThreshold { get; set; } |
|
int AdaptationSteps { get; set; } |
Number of gradient steps taken on each task’s support set. |
int CheckpointFrequency { get; set; } |
|
int EvaluationFrequency { get; set; } |
|
int EvaluationTasks { get; set; } |
|
int MetaBatchSize { get; set; } |
|
int NumMetaIterations { get; set; } |
|
int NumTokens { get; set; } |
Gets or sets the number of patch tokens to consider. |
int? RandomSeed { get; set; } |
Gets or sets the random seed. |
Methods
| Method | Summary |
|---|---|
IMetaLearnerOptions<T> Clone() |
|
bool IsValid() |