UniformTaskSampler<T, TInput, TOutput>
Models & Types · AiDotNet.MetaLearning.Data
Samples tasks uniformly at random from a meta-dataset. This is the simplest and most commonly used sampling strategy.
Implements: ITaskSampler<T, TInput, TOutput>
Constructors
| Constructor | Summary |
|---|---|
UniformTaskSampler(IMetaDataset<T, TInput, TOutput> dataset, int numWays, int numShots, int numQueryPerClass) |
Creates a uniform task sampler over the given meta-dataset. |
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) |