BatchEpisodeSampler<T, TInput, TOutput>
Models & Types · AiDotNet.MetaLearning.Data
Efficiently samples batches of episodes with optional prefetching and caching.
Wraps an ITaskSampler and provides batch-level operations
such as prefetching the next batch while the current batch is being trained on.
Constructors
| Constructor |
Summary |
BatchEpisodeSampler(ITaskSampler<T, TInput, TOutput> sampler, int batchSize, int prefetchCount) |
Creates a batch episode sampler. |
Properties
| Property |
Summary |
int BatchSize { get; } |
Gets the number of episodes per batch. |
int PrefetchedCount { get; } |
Gets the number of episodes currently in the prefetch buffer. |
Methods
| Method |
Summary |
IReadOnlyList<IEpisode<T, TInput, TOutput>> NextBatch() |
Gets the next batch of episodes. |
TaskBatch<T, TInput, TOutput> NextTaskBatch() |
Gets a task batch suitable for MetaTrain. |
void ProvideFeedback(IReadOnlyList<IEpisode<T, TInput, TOutput>> episodes, IReadOnlyList<double> losses) |
Provides feedback for the sampled episodes (delegates to underlying sampler). |