public class MiniBatchFileDataSetIterator extends Object implements DataSetIterator
Constructor and Description |
---|
MiniBatchFileDataSetIterator(DataSet baseData,
int batchSize) |
MiniBatchFileDataSetIterator(DataSet baseData,
int batchSize,
boolean delete) |
MiniBatchFileDataSetIterator(DataSet baseData,
int batchSize,
boolean delete,
File rootDir) |
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
|
File |
getRootDir() |
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
|
void |
setRootDir(File rootDir) |
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, wait
forEachRemaining
public MiniBatchFileDataSetIterator(DataSet baseData, int batchSize) throws IOException
baseData
- the base datasetbatchSize
- the batch size to split byIOException
public MiniBatchFileDataSetIterator(DataSet baseData, int batchSize, boolean delete, File rootDir) throws IOException
baseData
- the base datasetbatchSize
- the batch size to split byIOException
public MiniBatchFileDataSetIterator(DataSet baseData, int batchSize, boolean delete) throws IOException
baseData
- the base datasetbatchSize
- the batch size to split byIOException
public DataSet next(int num)
DataSetIterator
next
in interface DataSetIterator
num
- the number of examplespublic int totalExamples()
DataSetIterator
totalExamples
in interface DataSetIterator
public int inputColumns()
DataSetIterator
inputColumns
in interface DataSetIterator
public int totalOutcomes()
DataSetIterator
totalOutcomes
in interface DataSetIterator
public boolean resetSupported()
DataSetIterator
resetSupported
in interface DataSetIterator
public boolean asyncSupported()
DataSetIterator
asyncSupported
in interface DataSetIterator
public void reset()
DataSetIterator
reset
in interface DataSetIterator
public int batch()
DataSetIterator
batch
in interface DataSetIterator
public int cursor()
DataSetIterator
cursor
in interface DataSetIterator
public int numExamples()
DataSetIterator
numExamples
in interface DataSetIterator
public void setPreProcessor(DataSetPreProcessor preProcessor)
DataSetIterator
setPreProcessor
in interface DataSetIterator
preProcessor
- a pre processor to setpublic DataSetPreProcessor getPreProcessor()
DataSetIterator
getPreProcessor
in interface DataSetIterator
public List<String> getLabels()
DataSetIterator
getLabels
in interface DataSetIterator
public File getRootDir()
public void setRootDir(File rootDir)
Copyright © 2016. All Rights Reserved.