CNPAlgorithm<T, TInput, TOutput>
Models & Types · AiDotNet.MetaLearning.Algorithms
Implementation of Conditional Neural Process (CNP) (Garnelo et al., ICML 2018).
Inheritance: ModelBase<T, TInput, TOutput> → MetaLearnerBase<T, TInput, TOutput> → NeuralProcessBase<T, TInput, TOutput> → CNPAlgorithm<T, TInput, TOutput>
How It Works
CNP encodes each context pair independently, aggregates via mean pooling, and decodes to predict target values. It provides amortized inference without gradient-based adaptation.
Algorithm:
Constructors
| Constructor | Summary |
|---|---|
CNPAlgorithm(CNPOptions<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) |