OpenMAMLOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.MetaLearning.Options
Configuration options for Open-MAML (open-set MAML for open-world few-shot learning).
Inheritance: ModelOptions → OpenMAMLOptions<T, TInput, TOutput>
Implements: IMetaLearnerOptions<T>
For Beginners
Standard few-shot assumes all queries belong to known classes. Open-MAML handles the realistic case where some queries are from unknown classes:
- Adapt to support set like MAML
- Compute prototype distances for each query
- If a query is too far from ALL prototypes, classify as “unknown”
- Threshold is learned during meta-training
How It Works
Open-MAML extends MAML to handle open-set scenarios where query examples may belong to unknown classes not present in the support set. It adds an outlier detection mechanism to MAML’s adaptation process.
Constructors
| Constructor | Summary |
|---|---|
OpenMAMLOptions(IFullModel<T, TInput, TOutput> metaModel) |
Initializes a new instance of OpenMAMLOptions. |
Properties
| Property | Summary |
|---|---|
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; } |
Optimizer for task adaptation. |
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 OpenSetTaskFraction { get; set; } |
Gets or sets the fraction of tasks that include open-set queries during training. |
double OpenSetThreshold { get; set; } |
Gets or sets the initial threshold for open-set detection. |
double OuterLearningRate { get; set; } |
|
double? GradientClipThreshold { get; set; } |
|
int AdaptationSteps { get; set; } |
|
int CheckpointFrequency { get; set; } |
|
int EvaluationFrequency { get; set; } |
|
int EvaluationTasks { get; set; } |
|
int MetaBatchSize { get; set; } |
|
int NumMetaIterations { get; set; } |
|
int? RandomSeed { get; set; } |
Gets or sets the random seed. |
Methods
| Method | Summary |
|---|---|
IMetaLearnerOptions<T> Clone() |
|
bool IsValid() |