FreqPriorOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.MetaLearning.Options
Configuration options for FreqPrior: Frequency-based prior for cross-domain few-shot learning.
Inheritance: ModelOptions → FreqPriorOptions<T, TInput, TOutput>
Implements: IMetaLearnerOptions<T>
How It Works
FreqPrior decomposes the parameter space into frequency bands using a discrete cosine-like transform. Low-frequency components capture domain-invariant structure and are strongly regularized toward the meta-learned prior, while high-frequency components are allowed to vary freely for task-specific adaptation. This frequency-based prior encourages learning smooth, transferable representations.
Constructors
| Constructor | Summary |
|---|---|
FreqPriorOptions(IFullModel<T, TInput, TOutput> metaModel) |
Creates options for meta-learning metaModel, with the default settings. |
Properties
| Property | Summary |
|---|---|
IEpisodicDataLoader<T, TInput, TOutput> DataLoader { get; set; } |
Episodic data loader that supplies the meta-training tasks; null when tasks are passed to training directly. |
IFullModel<T, TInput, TOutput> MetaModel { get; set; } |
The model whose parameters the meta-learner trains to adapt quickly to new tasks. |
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; } |
Whether to use the first-order approximation of the meta-gradient. |
double FrequencyPenaltyScale { get; set; } |
Scale factor for the frequency penalty term applied to low-frequency gradient variance. |
double HighFreqRegWeight { get; set; } |
Regularization strength for high-frequency components (allows more variation). |
double InnerLearningRate { get; set; } |
|
double LowFreqFraction { get; set; } |
Fraction of parameters considered “low frequency” (strongly regularized). |
double LowFreqRegWeight { get; set; } |
Regularization strength for low-frequency components toward the meta-prior. |
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; } |
Methods
| Method | Summary |
|---|---|
IMetaLearnerOptions<T> Clone() |
|
bool IsValid() |