public abstract class AbstractDataSetIterator<T> extends Object implements DataSetIterator
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDataSetIterator(@NonNull Iterable<org.nd4j.common.primitives.Pair<T,T>> iterable,
int batchSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
asyncSupported() |
int |
batch()
Batch size
|
protected void |
fillQueue() |
List<String> |
getLabels()
Get dataset iterator record reader labels
|
DataSetPreProcessor |
getPreProcessor() |
boolean |
hasNext()
Returns
true if the iteration has more elements. |
int |
inputColumns()
Input columns for the dataset
|
DataSet |
next()
Returns the next element in the iteration.
|
DataSet |
next(int num)
Like the standard next method but allows a
customizable number of examples returned
|
void |
remove()
Removes from the underlying collection the last element returned
by this iterator (optional operation).
|
void |
reset()
Resets the iterator back to the beginning
|
boolean |
resetSupported() |
void |
setPreProcessor(DataSetPreProcessor preProcessor)
Set a pre processor
|
int |
totalOutcomes()
The number of labels for the dataset
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected AbstractDataSetIterator(@NonNull
@NonNull Iterable<org.nd4j.common.primitives.Pair<T,T>> iterable,
int batchSize)
public DataSet next(int num)
next in interface DataSetIteratornum - the number of examplespublic 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 void setPreProcessor(DataSetPreProcessor preProcessor)
setPreProcessor in interface DataSetIteratorpreProcessor - a pre processor to setpublic List<String> getLabels()
getLabels in interface DataSetIteratorpublic boolean hasNext()
true if the iteration has more elements.
(In other words, returns true if next(int) would
return an element rather than throwing an exception.)protected void fillQueue()
public DataSet next() throws NoSuchElementException
next in interface Iterator<DataSet>NoSuchElementException - if the iteration has no more elementspublic void remove()
next(int). The behavior of an iterator
is unspecified if the underlying collection is modified while the
iteration is in progress in any way other than by calling this
method.remove in interface Iterator<DataSet>UnsupportedOperationException - if the remove
operation is not supported by this iteratorIllegalStateException - if the next method has not
yet been called, or the remove method has already
been called after the last call to the next
methodpublic DataSetPreProcessor getPreProcessor()
getPreProcessor in interface DataSetIteratorCopyright © 2021. All rights reserved.