MetaSGDAdaptedModel<T, TInput, TOutput>
Models & Types · AiDotNet.MetaLearning.Algorithms
Wrapper model for Meta-SGD adapted models that includes the per-parameter optimizer.
Implements: IModel<TInput, TOutput, ModelMetadata<T>>
How It Works
This model wraps an adapted model along with its per-parameter optimizer, allowing for further adaptation or inspection of learned coefficients.
Constructors
| Constructor | Summary |
|---|---|
MetaSGDAdaptedModel(IFullModel<T, TInput, TOutput> model, PerParameterOptimizer<T, TInput, TOutput> optimizer, MetaSGDOptions<T, TInput, TOutput> options) |
Initializes a new instance of the MetaSGDAdaptedModel. |
Properties
| Property | Summary |
|---|---|
ModelMetadata<T> Metadata { get; } |
Gets the model metadata. |
PerParameterOptimizer<T, TInput, TOutput> Optimizer { get; } |
Gets the per-parameter optimizer (for inspection or further adaptation). |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
Gets the model metadata. |
TOutput Predict(TInput input) |
Makes predictions using the adapted model. |
Vector<T> GetParameters() |
Gets the current model parameters. |
void SetParameters(Vector<T> parameters) |
Sets the model parameters. |
void Train(TInput inputs, TOutput targets) |
Trains the model on the given data. |