public class DataIterable extends java.lang.Object implements java.lang.Iterable<Batch>, java.util.Iterator<Batch>
Dataset, Batchifier, Pipeline, and Sampler to provide an iterable over the given RandomAccessDataset.
We don't recommended using DataIterable directly. Instead use RandomAccessDataset
combined with Trainer to iterate over the RandomAccessDataset}
| Constructor and Description |
|---|
DataIterable(RandomAccessDataset dataset,
NDManager manager,
Sampler sampler,
Batchifier batchifier,
Pipeline pipeline,
Pipeline targetPipeline,
java.util.concurrent.ExecutorService executor,
int preFetchNumber,
long maxIteration,
Device device)
Creates a new instance of
DataIterable with the given parameters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
java.util.Iterator<Batch> |
iterator() |
Batch |
next() |
public DataIterable(RandomAccessDataset dataset, NDManager manager, Sampler sampler, Batchifier batchifier, Pipeline pipeline, Pipeline targetPipeline, java.util.concurrent.ExecutorService executor, int preFetchNumber, long maxIteration, Device device)
DataIterable with the given parameters.dataset - the dataset to iterate onmanager - the manager to create the arrayssampler - a sampler to sample data withbatchifier - a batchifierpipeline - the pipeline of transforms to apply on the datatargetPipeline - the pipeline of transforms to apply on the labelsexecutor - an ExecutorServicepreFetchNumber - the number of samples to prefetchmaxIteration - the maximum number of iterationsdevice - the Device