public interface Dataset
Modifier and Type | Interface and Description |
---|---|
static class |
Dataset.Usage
An enum that indicates the mode - training, test or validation.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<Batch> |
getData(NDManager manager)
Fetches an iterator that can iterate through the
Dataset . |
default java.lang.Iterable<Batch> |
getData(NDManager manager,
java.util.concurrent.ExecutorService executorService)
Fetches an iterator that can iterate through the
Dataset with multiple threads. |
default void |
prepare()
Prepares the dataset for use.
|
void |
prepare(ai.djl.util.Progress progress)
Prepares the dataset for use with tracked progress.
|
java.lang.Iterable<Batch> getData(NDManager manager) throws java.io.IOException, TranslateException
Dataset
.manager
- the dataset to iterate throughIterable
of Batch
that contains batches of data from the datasetjava.io.IOException
- for various exceptions depending on the datasetTranslateException
- if there is an error while processing inputdefault java.lang.Iterable<Batch> getData(NDManager manager, java.util.concurrent.ExecutorService executorService) throws java.io.IOException, TranslateException
Dataset
with multiple threads.manager
- the dataset to iterate throughexecutorService
- the executorService to use for multi-threadingIterable
of Batch
that contains batches of data from the datasetjava.io.IOException
- for various exceptions depending on the datasetTranslateException
- if there is an error while processing inputdefault void prepare() throws java.io.IOException, TranslateException
java.io.IOException
- for various exceptions depending on the datasetTranslateException
- if there is an error while processing inputvoid prepare(ai.djl.util.Progress progress) throws java.io.IOException, TranslateException
progress
- the progress trackerjava.io.IOException
- for various exceptions depending on the datasetTranslateException
- if there is an error while processing input