Interface MultiDataSetIterator
-
- All Superinterfaces:
Iterator<MultiDataSet>
,Serializable
- All Known Subinterfaces:
ParallelMultiDataSetIterator
- All Known Implementing Classes:
AsyncMultiDataSetIterator
,MultiDataSetIteratorAdapter
,SingletonMultiDataSetIterator
,TestMultiDataSetIterator
public interface MultiDataSetIterator extends Iterator<MultiDataSet>, Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
asyncSupported()
Does this MultiDataSetIterator support asynchronous prefetching of multiple MultiDataSet objects? Most MultiDataSetIterators do, but in some cases it may not make sense to wrap this iterator in an iterator that does asynchronous prefetching.MultiDataSetPreProcessor
getPreProcessor()
Get theMultiDataSetPreProcessor
, if one has previously been set.MultiDataSet
next(int num)
Fetch the next 'num' examples.void
reset()
Resets the iterator back to the beginningboolean
resetSupported()
Is resetting supported by this DataSetIterator? Many DataSetIterators do support resetting, but some don'tvoid
setPreProcessor(MultiDataSetPreProcessor preProcessor)
Set the preprocessor to be applied to each MultiDataSet, before each MultiDataSet is returned.-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
next
MultiDataSet next(int num)
Fetch the next 'num' examples. Similar to the next method, but returns a specified number of examples- Parameters:
num
- Number of examples to fetch
-
setPreProcessor
void setPreProcessor(MultiDataSetPreProcessor preProcessor)
Set the preprocessor to be applied to each MultiDataSet, before each MultiDataSet is returned.- Parameters:
preProcessor
- MultiDataSetPreProcessor. May be null.
-
getPreProcessor
MultiDataSetPreProcessor getPreProcessor()
Get theMultiDataSetPreProcessor
, if one has previously been set. Returns null if no preprocessor has been set- Returns:
- Preprocessor
-
resetSupported
boolean resetSupported()
Is resetting supported by this DataSetIterator? Many DataSetIterators do support resetting, but some don't- Returns:
- true if reset method is supported; false otherwise
-
asyncSupported
boolean asyncSupported()
Does this MultiDataSetIterator support asynchronous prefetching of multiple MultiDataSet objects? Most MultiDataSetIterators do, but in some cases it may not make sense to wrap this iterator in an iterator that does asynchronous prefetching. For example, it would not make sense to use asynchronous prefetching for the following types of iterators: (a) Iterators that store their full contents in memory already (b) Iterators that re-use features/labels arrays (as future next() calls will overwrite past contents) (c) Iterators that already implement some level of asynchronous prefetching (d) Iterators that may return different data depending on when the next() method is called- Returns:
- true if asynchronous prefetching from this iterator is OK; false if asynchronous prefetching should not be used with this iterator
-
reset
void reset()
Resets the iterator back to the beginning
-
-