Class MultipleEpochsIterator
- java.lang.Object
-
- org.nd4j.linalg.dataset.api.iterator.MultipleEpochsIterator
-
- All Implemented Interfaces:
Serializable,Iterator<DataSet>,DataSetIterator
@Deprecated public class MultipleEpochsIterator extends Object implements DataSetIterator
Deprecated.A dataset iterator for doing multiple passes over a dataset- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultipleEpochsIterator(int numPasses, DataSetIterator iter)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanasyncSupported()Deprecated.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.intbatch()Deprecated.Batch sizeList<String>getLabels()Deprecated.Get dataset iterator class labels, if any.DataSetPreProcessorgetPreProcessor()Deprecated.Returns preprocessors, if definedbooleanhasNext()Deprecated.Returnstrueif the iteration has more elements.intinputColumns()Deprecated.Input columns for the datasetDataSetnext()Deprecated.Returns the next element in the iteration.DataSetnext(int num)Deprecated.Like the standard next method but allows a customizable number of examples returnedvoidremove()Deprecated.Removes from the underlying collection the last element returned by this iterator (optional operation).voidreset()Deprecated.Resets the iterator back to the beginningbooleanresetSupported()Deprecated.Is resetting supported by this DataSetIterator? Many DataSetIterators do support resetting, but some don'tvoidsetPreProcessor(DataSetPreProcessor preProcessor)Deprecated.Set a pre processorinttotalOutcomes()Deprecated.The number of labels for the dataset-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
MultipleEpochsIterator
public MultipleEpochsIterator(int numPasses, DataSetIterator iter)Deprecated.
-
-
Method Detail
-
next
public DataSet next(int num)
Deprecated.Like the standard next method but allows a customizable number of examples returned- Specified by:
nextin interfaceDataSetIterator- Parameters:
num- the number of examples- Returns:
- the next data applyTransformToDestination
-
inputColumns
public int inputColumns()
Deprecated.Input columns for the dataset- Specified by:
inputColumnsin interfaceDataSetIterator- Returns:
-
totalOutcomes
public int totalOutcomes()
Deprecated.The number of labels for the dataset- Specified by:
totalOutcomesin interfaceDataSetIterator- Returns:
-
resetSupported
public boolean resetSupported()
Deprecated.Description copied from interface:DataSetIteratorIs resetting supported by this DataSetIterator? Many DataSetIterators do support resetting, but some don't- Specified by:
resetSupportedin interfaceDataSetIterator- Returns:
- true if reset method is supported; false otherwise
-
asyncSupported
public boolean asyncSupported()
Deprecated.Description copied from interface:DataSetIteratorDoes 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. 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- Specified by:
asyncSupportedin interfaceDataSetIterator- Returns:
- true if asynchronous prefetching from this iterator is OK; false if asynchronous prefetching should not be used with this iterator
-
reset
public void reset()
Deprecated.Resets the iterator back to the beginning- Specified by:
resetin interfaceDataSetIterator
-
batch
public int batch()
Deprecated.Batch size- Specified by:
batchin interfaceDataSetIterator- Returns:
-
setPreProcessor
public void setPreProcessor(DataSetPreProcessor preProcessor)
Deprecated.Set a pre processor- Specified by:
setPreProcessorin interfaceDataSetIterator- Parameters:
preProcessor- a pre processor to set
-
getPreProcessor
public DataSetPreProcessor getPreProcessor()
Deprecated.Description copied from interface:DataSetIteratorReturns preprocessors, if defined- Specified by:
getPreProcessorin interfaceDataSetIterator- Returns:
-
getLabels
public List<String> getLabels()
Deprecated.Description copied from interface:DataSetIteratorGet dataset iterator class labels, if any. Note that implementations are not required to implement this, and can simply return null- Specified by:
getLabelsin interfaceDataSetIterator
-
hasNext
public boolean hasNext()
Deprecated.Returnstrueif the iteration has more elements. (In other words, returnstrueifnext(int)would return an element rather than throwing an exception.)
-
next
public DataSet next()
Deprecated.Returns the next element in the iteration.
-
remove
public void remove()
Deprecated.Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call tonext(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.- Specified by:
removein interfaceIterator<DataSet>- Throws:
UnsupportedOperationException- if theremoveoperation is not supported by this iteratorIllegalStateException- if thenextmethod has not yet been called, or theremovemethod has already been called after the last call to thenextmethod
-
-