public class TestDataSetIterator extends Object implements DataSetIterator
| Constructor and Description |
|---|
TestDataSetIterator(DataSet dataset)
This makes an iterator from the given dataset and batchsize
ONLY for use in tests in nd4j
Initializes with a default batch of 5
|
TestDataSetIterator(DataSet dataset,
int batch) |
TestDataSetIterator(List<DataSet> coll,
int batch) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
asyncSupported()
Does this DataSetIterator support asynchronous prefetching of multiple DataSet objects?
Most DataSetIterators do, but in some cases it may not make sense to wrap this iterator in an
iterator that does asynchronous prefetching.
|
int |
batch()
Batch size
|
int |
cursor()
The current cursor if applicable
|
List<String> |
getLabels()
Get dataset iterator record reader labels
|
DataSetPreProcessor |
getPreProcessor()
Returns preprocessors, if defined
|
boolean |
hasNext() |
int |
inputColumns()
Input columns for the dataset
|
DataSet |
next() |
DataSet |
next(int num)
Like the standard next method but allows a
customizable number of examples returned
|
int |
numExamples()
Total number of examples in the dataset
|
void |
remove() |
void |
reset()
Resets the iterator back to the beginning
|
boolean |
resetSupported()
Is resetting supported by this DataSetIterator? Many DataSetIterators do support resetting,
but some don't
|
void |
setPreProcessor(DataSetPreProcessor preProcessor)
Set a pre processor
|
int |
totalExamples()
Total examples in the iterator
|
int |
totalOutcomes()
The number of labels for the dataset
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic TestDataSetIterator(DataSet dataset, int batch)
public TestDataSetIterator(DataSet dataset)
dataset - the dataset to make the iterator frombatch - the batchsize for the iteratorpublic int totalExamples()
DataSetIteratortotalExamples in interface DataSetIteratorpublic int inputColumns()
DataSetIteratorinputColumns in interface DataSetIteratorpublic int totalOutcomes()
DataSetIteratortotalOutcomes in interface DataSetIteratorpublic boolean resetSupported()
DataSetIteratorresetSupported in interface DataSetIteratorpublic boolean asyncSupported()
DataSetIteratorasyncSupported in interface DataSetIteratorpublic void reset()
DataSetIteratorreset in interface DataSetIteratorpublic int batch()
DataSetIteratorbatch in interface DataSetIteratorpublic int cursor()
DataSetIteratorcursor in interface DataSetIteratorpublic int numExamples()
DataSetIteratornumExamples in interface DataSetIteratorpublic void setPreProcessor(DataSetPreProcessor preProcessor)
DataSetIteratorsetPreProcessor in interface DataSetIteratorpreProcessor - a pre processor to setpublic DataSetPreProcessor getPreProcessor()
DataSetIteratorgetPreProcessor in interface DataSetIteratorpublic List<String> getLabels()
DataSetIteratorgetLabels in interface DataSetIteratorpublic DataSet next(int num)
DataSetIteratornext in interface DataSetIteratornum - the number of examplesCopyright © 2018. All rights reserved.