FreqPromptAlgorithm<T, TInput, TOutput>

Models & Types · AiDotNet.MetaLearning.Algorithms

Implementation of FreqPrompt: Frequency-domain prompt tuning for few-shot learning.

Inheritance: ModelBase<T, TInput, TOutput> → MetaLearnerBase<T, TInput, TOutput> → FreqPromptAlgorithm<T, TInput, TOutput>

Implements: IGeneratedParameterRegistrar<T>

How It Works

FreqPrompt meta-learns a set of frequency basis vectors and their coefficients that act as additive “prompts” in the parameter space. During adaptation, only the prompt coefficients are updated (the backbone is frozen), which enables efficient adaptation with very few parameters. Low-frequency prompts capture coarse domain shifts while high-frequency prompts handle fine-grained adjustments.

Algorithm:

Constructors

Constructor Summary
FreqPromptAlgorithm(FreqPromptOptions<T, TInput, TOutput> options)

Properties

Property Summary
MetaLearningAlgorithmType AlgorithmType { get; }

Methods

Method Summary
IModel<TInput, TOutput, ModelMetadata<T>> Adapt(IMetaLearningTask<T, TInput, TOutput> task)
T MetaTrain(TaskBatch<T, TInput, TOutput> taskBatch)