Package ai.djl.training.dataset
Class SequenceSampler
java.lang.Object
ai.djl.training.dataset.SequenceSampler
- All Implemented Interfaces:
Sampler.SubSampler
SequenceSampler
is an implementation of the Sampler.SubSampler
interface.
SequenceSampler
samples the data from [0, dataset.size) sequentially.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsample
(RandomAccessDataset dataset) Fetches an iterator that iterates through the indices of the givenRandomAccessDataset
.
-
Constructor Details
-
SequenceSampler
public SequenceSampler()
-
-
Method Details
-
sample
Fetches an iterator that iterates through the indices of the givenRandomAccessDataset
.- Specified by:
sample
in interfaceSampler.SubSampler
- Parameters:
dataset
- theRandomAccessDataset
to sample from- Returns:
- an iterator that iterates through the indices of the given
RandomAccessDataset
-