public class DataSetLoaderIterator extends Object implements DataSetIterator
| Modifier and Type | Field and Description |
|---|---|
protected Iterator<String> |
iter |
protected org.nd4j.common.loader.Loader<DataSet> |
loader |
protected int[] |
order |
protected List<String> |
paths |
protected int |
position |
protected DataSetPreProcessor |
preProcessor |
protected Random |
rng |
protected org.nd4j.common.loader.SourceFactory |
sourceFactory |
| Constructor and Description |
|---|
DataSetLoaderIterator(Collection<String> paths,
org.nd4j.common.loader.Loader<DataSet> loader,
org.nd4j.common.loader.SourceFactory sourceFactory)
Iterate of the specified collection of strings without randomization
|
DataSetLoaderIterator(Collection<String> paths,
Random rng,
org.nd4j.common.loader.Loader<DataSet> loader,
org.nd4j.common.loader.SourceFactory sourceFactory)
Iterate of the specified collection of strings with optional randomization
|
DataSetLoaderIterator(Iterator<String> paths,
org.nd4j.common.loader.Loader<DataSet> loader,
org.nd4j.common.loader.SourceFactory sourceFactory)
NOTE: When using this constructor (with
Iterator<String>) the DataSetIterator cannot be reset. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
asyncSupported() |
int |
batch() |
List<String> |
getLabels() |
boolean |
hasNext() |
int |
inputColumns() |
DataSet |
next() |
DataSet |
next(int i) |
void |
remove() |
void |
reset() |
boolean |
resetSupported() |
int |
totalOutcomes() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPreProcessor, setPreProcessorforEachRemainingprotected final org.nd4j.common.loader.SourceFactory sourceFactory
protected final org.nd4j.common.loader.Loader<DataSet> loader
protected final Random rng
protected final int[] order
protected int position
protected DataSetPreProcessor preProcessor
public DataSetLoaderIterator(Iterator<String> paths, org.nd4j.common.loader.Loader<DataSet> loader, org.nd4j.common.loader.SourceFactory sourceFactory)
Iterator<String>) the DataSetIterator cannot be reset.
Use the other construtor that takes Collection<String>paths - Paths to iterate overloader - Loader to use when loading DataSetssourceFactory - The factory to use to convert the paths into streams via Sourcepublic DataSetLoaderIterator(Collection<String> paths, org.nd4j.common.loader.Loader<DataSet> loader, org.nd4j.common.loader.SourceFactory sourceFactory)
paths - Paths to iterate overloader - Loader to use when loading DataSetssourceFactory - The factory to use to convert the paths into streams via Sourcepublic DataSetLoaderIterator(Collection<String> paths, Random rng, org.nd4j.common.loader.Loader<DataSet> loader, org.nd4j.common.loader.SourceFactory sourceFactory)
paths - Paths to iterate overrng - Optional random instance to use for shuffling of order. If null, no shuffling will be used.loader - Loader to use when loading DataSetssourceFactory - The factory to use to convert the paths into streams via Sourcepublic DataSet next(int i)
next in interface DataSetIteratorpublic int inputColumns()
inputColumns in interface DataSetIteratorpublic int totalOutcomes()
totalOutcomes in interface DataSetIteratorpublic boolean resetSupported()
resetSupported in interface DataSetIteratorpublic boolean asyncSupported()
asyncSupported in interface DataSetIteratorpublic void reset()
reset in interface DataSetIteratorpublic int batch()
batch in interface DataSetIteratorpublic List<String> getLabels()
getLabels in interface DataSetIteratorCopyright © 2021. All rights reserved.