Package ai.djl.training.dataset
Class DataIterable
java.lang.Object
ai.djl.training.dataset.DataIterable
- Direct Known Subclasses:
BulkDataIterable
DataIterable is a data loader that combines
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}
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Batchifierprotected RandomAccessDatasetprotected Deviceprotected Batchifierprotected NDManagerprotected Pipelineprotected Pipeline -
Constructor Summary
ConstructorsConstructorDescriptionDataIterable(RandomAccessDataset dataset, NDManager manager, Sampler sampler, Batchifier dataBatchifier, Batchifier labelBatchifier, Pipeline pipeline, Pipeline targetPipeline, ExecutorService executor, int preFetchNumber, Device device) Creates a new instance ofDataIterablewith the given parameters. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
dataset
-
manager
-
dataBatchifier
-
labelBatchifier
-
pipeline
-
targetPipeline
-
device
-
-
Constructor Details
-
DataIterable
public DataIterable(RandomAccessDataset dataset, NDManager manager, Sampler sampler, Batchifier dataBatchifier, Batchifier labelBatchifier, Pipeline pipeline, Pipeline targetPipeline, ExecutorService executor, int preFetchNumber, Device device) Creates a new instance ofDataIterablewith the given parameters.- Parameters:
dataset- the dataset to iterate onmanager- the manager to create the arrayssampler- a sampler to sample data withdataBatchifier- a batchifier for datalabelBatchifier- a batchifier for labelspipeline- the pipeline of transforms to apply on the datatargetPipeline- the pipeline of transforms to apply on the labelsexecutor- anExecutorServicepreFetchNumber- the number of samples to prefetchdevice- theDevice
-
-
Method Details