public class MultipleEpochsIterator extends Object implements org.nd4j.linalg.dataset.api.iterator.DataSetIterator
Modifier and Type | Field and Description |
---|---|
protected int |
batch |
protected List<org.nd4j.linalg.dataset.DataSet> |
batchedDS |
protected org.nd4j.linalg.dataset.DataSet |
ds |
protected int |
epochs |
protected org.nd4j.linalg.dataset.api.iterator.DataSetIterator |
iter |
protected AtomicLong |
iterationsCounter |
protected int |
lastBatch |
protected static org.slf4j.Logger |
log |
protected boolean |
newEpoch |
protected int |
numEpochs |
protected org.nd4j.linalg.dataset.api.DataSetPreProcessor |
preProcessor |
protected long |
totalIterations |
Constructor and Description |
---|
MultipleEpochsIterator(org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter,
int queueSize,
long totalIterations)
Deprecated.
|
MultipleEpochsIterator(org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter,
long totalIterations) |
MultipleEpochsIterator(int numEpochs,
org.nd4j.linalg.dataset.DataSet ds) |
MultipleEpochsIterator(int numEpochs,
org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter) |
MultipleEpochsIterator(int numEpochs,
org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter,
int queueSize)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
asyncSupported() |
int |
batch()
Batch size
|
int |
cursor()
The current cursor if applicable
|
List<String> |
getLabels() |
boolean |
hasNext()
Returns
true if the iteration has more elements. |
int |
inputColumns()
Input columns for the dataset
|
org.nd4j.linalg.dataset.DataSet |
next() |
org.nd4j.linalg.dataset.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()
Removes from the underlying collection the last element returned
by this iterator (optional operation).
|
void |
reset()
Resets the iterator back to the beginning
|
boolean |
resetSupported() |
void |
setPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor) |
int |
totalExamples()
Total examples in the iterator
|
int |
totalOutcomes()
The number of labels for the dataset
|
void |
trackEpochs() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPreProcessor
forEachRemaining
protected int epochs
protected int numEpochs
protected int batch
protected int lastBatch
protected org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter
protected org.nd4j.linalg.dataset.DataSet ds
protected List<org.nd4j.linalg.dataset.DataSet> batchedDS
protected static final org.slf4j.Logger log
protected org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor
protected boolean newEpoch
protected AtomicLong iterationsCounter
protected long totalIterations
public MultipleEpochsIterator(int numEpochs, org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter)
@Deprecated public MultipleEpochsIterator(int numEpochs, org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter, int queueSize)
@Deprecated public MultipleEpochsIterator(org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter, int queueSize, long totalIterations)
public MultipleEpochsIterator(org.nd4j.linalg.dataset.api.iterator.DataSetIterator iter, long totalIterations)
public MultipleEpochsIterator(int numEpochs, org.nd4j.linalg.dataset.DataSet ds)
public org.nd4j.linalg.dataset.DataSet next(int num)
next
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
num
- the number of examplespublic void trackEpochs()
public org.nd4j.linalg.dataset.DataSet next()
public int totalExamples()
totalExamples
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int inputColumns()
inputColumns
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int totalOutcomes()
totalOutcomes
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public boolean resetSupported()
resetSupported
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public boolean asyncSupported()
asyncSupported
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public void reset()
reset
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int batch()
batch
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int cursor()
cursor
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int numExamples()
numExamples
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public void setPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor)
setPreProcessor
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public List<String> getLabels()
getLabels
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public boolean hasNext()
true
if the iteration has more elements.
(In other words, returns true
if next(int)
would
return an element rather than throwing an exception.)public void remove()
next(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.remove
in interface Iterator<org.nd4j.linalg.dataset.DataSet>
UnsupportedOperationException
- if the remove
operation is not supported by this iteratorIllegalStateException
- if the next
method has not
yet been called, or the remove
method has already
been called after the last call to the next
methodCopyright © 2017. All rights reserved.