CurriculumTaskSampler<T, TInput, TOutput>
Models & Types · AiDotNet.MetaLearning.Data
Samples tasks following a difficulty-based curriculum: starts with easy tasks and gradually increases difficulty as training progresses. Uses episode difficulty scores and observed losses to order task presentation.
Implements: ITaskSampler<T, TInput, TOutput>
For Beginners
Just like teaching a student easy problems before hard ones, curriculum learning presents the meta-learner with simple tasks first and gradually introduces harder tasks. This typically leads to faster and more stable training.
Constructors
| Constructor | Summary |
|---|---|
CurriculumTaskSampler(IMetaDataset<T, TInput, TOutput> dataset, int numWays, int numShots, int numQueryPerClass, double paceRate, double initialDifficulty, int? seed) |
Creates a curriculum task sampler that increases difficulty over time. |
Properties
| Property | Summary |
|---|---|
int NumQueryPerClass { get; } |
|
int NumShots { get; } |
|
int NumWays { get; } |
Methods
| Method | Summary |
|---|---|
IEpisode<T, TInput, TOutput> SampleOne() |
|
TaskBatch<T, TInput, TOutput> SampleBatch(int batchSize) |
|
void SetSeed(int seed) |
|
void UpdateWithFeedback(IReadOnlyList<IEpisode<T, TInput, TOutput>> episodes, IReadOnlyList<double> losses) |