MetaLearningModelBase<T, TInput, TOutput>

Base Classes ยท AiDotNet.MetaLearning.Models

Abstract base class for meta-learning adapted models that wrap a base model with task-specific parameters.

Inheritance: ModelWrapperBase<T, TInput, TOutput> โ†’ MetaLearningModelBase<T, TInput, TOutput>

Known derived types: AdaptedMetaModel<T, TInput, TOutput>, LFTAdaptedModel<T, TInput, TOutput>, MbPAAdaptedModel<T, TInput, TOutput>, NeuralProcessModel<T, TInput, TOutput>

For Beginners

Meta-learning adapted models are created by meta-learning algorithms (like MAML, ProtoNets, etc.) after adapting to a new task. They wrap a base neural network with task-specific parameters. This base class handles common concerns like serialization, gradient computation, and feature awareness by delegating to the wrapped model.

How It Works

Extends ModelWrapperBase with meta-learning-specific behavior: training is not supported directly (use the meta-learning algorithm instead), and parameter management is abstract so each adapted model can store its own task-specific parameters.

Methods

Method Summary
void ApplyGradients(Vector<T> gradients, T learningRate)
void Train(TInput input, TOutput expectedOutput)