public class BaseDatasetIterator extends Object implements DataSetIterator
| Modifier and Type | Field and Description |
|---|---|
protected int |
batch |
protected DataSetFetcher |
fetcher |
protected int |
numExamples |
protected DataSetPreProcessor |
preProcessor |
| Constructor and Description |
|---|
BaseDatasetIterator(int batch,
int numExamples,
DataSetFetcher fetcher) |
| Modifier and Type | Method and Description |
|---|---|
int |
batch()
Batch size
|
int |
cursor()
The current cursor if applicable
|
List<String> |
getLabels()
Get dataset iterator record reader labels
|
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
|
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, waitforEachRemainingprotected int batch
protected int numExamples
protected DataSetFetcher fetcher
protected DataSetPreProcessor preProcessor
public BaseDatasetIterator(int batch,
int numExamples,
DataSetFetcher fetcher)
public int totalExamples()
DataSetIteratortotalExamples in interface DataSetIteratorpublic int inputColumns()
DataSetIteratorinputColumns in interface DataSetIteratorpublic int totalOutcomes()
DataSetIteratortotalOutcomes 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)
setPreProcessor in interface DataSetIteratorpreProcessor - a pre processor to setpublic List<String> getLabels()
DataSetIteratorgetLabels in interface DataSetIteratorpublic DataSet next(int num)
DataSetIteratornext in interface DataSetIteratornum - the number of examplesCopyright © 2016. All Rights Reserved.