ContinualLearnerConfig<T>
Options & Configuration · AiDotNet.ContinualLearning.Config
Production-ready configuration for continual learning algorithms.
Implements: IContinualLearnerConfig<T>
For Beginners
This class provides all settings needed for continual learning. All properties have industry-standard defaults set in the constructor.
How It Works
Usage Example:
Industry Standard Defaults:
- Learning Rate: 0.001 (Adam optimizer standard)
- Batch Size: 32 (balance of speed and gradient noise)
- EWC Lambda: 1000 (based on Kirkpatrick et al. 2017)
- Distillation Temperature: 2.0 (based on Li and Hoiem 2017)
Constructors
| Constructor | Summary |
|---|---|
ContinualLearnerConfig() |
Initializes a new instance with industry-standard default values. |
Properties
| Property | Summary |
|---|---|
MemorySamplingStrategy MemoryStrategy { get; set; } |
|
T AGemMargin { get; set; } |
|
T BiCValidationFraction { get; set; } |
|
T DistillationTemperature { get; set; } |
|
T DistillationWeight { get; set; } |
|
T EwcLambda { get; set; } |
|
T GemMemoryStrength { get; set; } |
|
T GradientClipNorm { get; set; } |
|
T HatSmax { get; set; } |
|
T HatSparsity { get; set; } |
|
T LearningRate { get; set; } |
|
T MasLambda { get; set; } |
|
T OnlineEwcGamma { get; set; } |
|
T PackNetPruneRatio { get; set; } |
|
T PnnLateralScaling { get; set; } |
|
T SiC { get; set; } |
|
T SiXi { get; set; } |
|
T WeightDecay { get; set; } |
|
bool ComputeBackwardTransfer { get; set; } |
|
bool ComputeForwardTransfer { get; set; } |
|
bool ICarlUseHerding { get; set; } |
|
bool NormalizeFisher { get; set; } |
|
bool PnnUseLateralConnections { get; set; } |
|
bool UseEmpiricalFisher { get; set; } |
|
bool UseGradientClipping { get; set; } |
|
bool UsePrioritizedReplay { get; set; } |
|
bool UseSoftTargets { get; set; } |
|
bool UseWeightDecay { get; set; } |
|
int AGemReferenceGradients { get; set; } |
|
int BatchSize { get; set; } |
|
int EpochsPerTask { get; set; } |
|
int EvaluationFrequency { get; set; } |
|
int FisherSamples { get; set; } |
|
int ICarlExemplarsPerClass { get; set; } |
|
int MaxTasks { get; set; } |
|
int MemorySize { get; set; } |
|
int PackNetRetrainEpochs { get; set; } |
|
int SamplesPerTask { get; set; } |
|
int? RandomSeed { get; set; } |
Methods
| Method | Summary |
|---|---|
ContinualLearnerConfig<T> ForEwc(T lambda, int? fisherSamples) |
Creates a configuration optimized for EWC strategy. |
ContinualLearnerConfig<T> ForExperienceReplay(int? memorySize, MemorySamplingStrategy? strategy, bool? prioritized) |
Creates a configuration optimized for experience replay. |
ContinualLearnerConfig<T> ForGem(T memoryStrength, int? memorySize) |
Creates a configuration optimized for GEM strategy. |
ContinualLearnerConfig<T> ForLwf(T temperature) |
Creates a configuration optimized for LwF strategy with default distillation weight. |
ContinualLearnerConfig<T> ForLwf(T temperature, T weight) |
Creates a configuration optimized for LwF strategy. |
bool IsValid() |