public class CifarDataSetIterator extends RecordReaderDataSetIterator
RecordReaderDataSetIterator.Builder| Modifier and Type | Field and Description |
|---|---|
protected static int |
CHANNELS |
protected int |
exampleCount |
protected static int |
HEIGHT |
protected org.datavec.image.transform.ImageTransform |
imageTransform |
protected org.datavec.image.loader.CifarLoader |
loader |
protected int |
numExamples |
protected boolean |
overshot |
protected boolean |
train |
protected boolean |
useSpecialPreProcessCifar |
protected static int |
WIDTH |
batchNum, batchSize, converter, labelIndex, labelIndexTo, last, maxNumBatches, numPossibleLabels, preProcessor, recordReader, regression, sequenceIter, useCurrent| Constructor and Description |
|---|
CifarDataSetIterator(int batchSize,
int numExamples)
Loads images with given batchSize & numExamples returned by the generator.
|
CifarDataSetIterator(int batchSize,
int[] imgDim)
Loads images with given batchSize & imgDim returned by the generator.
|
CifarDataSetIterator(int batchSize,
int numExamples,
boolean train)
Loads images with given batchSize, numExamples, & version returned by the generator.
|
CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim)
Loads images with given batchSize, numExamples, & imgDim returned by the generator.
|
CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
boolean train)
Loads images with given batchSize, numExamples, imgDim & version returned by the generator.
|
CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
boolean useSpecialPreProcessCifar,
boolean train)
Loads images with given batchSize, numExamples, imgDim & version returned by the generator.
|
CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
int numPossibleLables,
org.datavec.image.transform.ImageTransform imageTransform,
boolean useSpecialPreProcessCifar,
boolean train)
Create Cifar data specific iterator
|
CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
int numPossibleLables,
org.datavec.image.transform.ImageTransform imageTransform,
boolean useSpecialPreProcessCifar,
boolean train,
long rngSeed,
boolean randomize)
Create Cifar data specific iterator
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
asyncSupported() |
List<String> |
getLabels() |
boolean |
hasNext() |
org.nd4j.linalg.dataset.DataSet |
next(int batchSize) |
void |
reset() |
boolean |
resetSupported() |
int |
totalExamples() |
batch, cursor, getPreProcessor, inputColumns, isCollectMetaData, loadFromMetaData, loadFromMetaData, next, numExamples, remove, setCollectMetaData, setPreProcessor, totalOutcomesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected static final int HEIGHT
protected static final int WIDTH
protected static final int CHANNELS
protected final org.datavec.image.loader.CifarLoader loader
protected final int numExamples
protected final boolean useSpecialPreProcessCifar
protected final boolean train
protected final org.datavec.image.transform.ImageTransform imageTransform
protected int exampleCount
protected boolean overshot
public CifarDataSetIterator(int batchSize,
int numExamples)
public CifarDataSetIterator(int batchSize,
int numExamples,
boolean train)
public CifarDataSetIterator(int batchSize,
int[] imgDim)
public CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim)
public CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
boolean train)
public CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
boolean useSpecialPreProcessCifar,
boolean train)
public CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
int numPossibleLables,
org.datavec.image.transform.ImageTransform imageTransform,
boolean useSpecialPreProcessCifar,
boolean train)
batchSize - the batch size of the examplesimgDim - an array of height, width and channelsnumExamples - the overall number of examplesimageTransform - the transformation to apply to the imagesuseSpecialPreProcessCifar - use Zagoruyko's preprocess for Cifartrain - true if use training set and false for testpublic CifarDataSetIterator(int batchSize,
int numExamples,
int[] imgDim,
int numPossibleLables,
org.datavec.image.transform.ImageTransform imageTransform,
boolean useSpecialPreProcessCifar,
boolean train,
long rngSeed,
boolean randomize)
batchSize - the batch size of the examplesimgDim - an array of height, width and channelsnumExamples - the overall number of examplesimageTransform - the transformation to apply to the imagesuseSpecialPreProcessCifar - use Zagoruyko's preprocess for Cifartrain - true if use training set and false for testrngSeed - Seed for RNG repeatabilityrandomize - If true: randomize the iteration order of the imagespublic org.nd4j.linalg.dataset.DataSet next(int batchSize)
next in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratornext in class RecordReaderDataSetIteratorpublic boolean hasNext()
hasNext in interface Iterator<org.nd4j.linalg.dataset.DataSet>hasNext in class RecordReaderDataSetIteratorpublic int totalExamples()
totalExamples in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratortotalExamples in class RecordReaderDataSetIteratorpublic void reset()
reset in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorreset in class RecordReaderDataSetIteratorpublic boolean resetSupported()
resetSupported in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorresetSupported in class RecordReaderDataSetIteratorpublic List<String> getLabels()
getLabels in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorgetLabels in class RecordReaderDataSetIteratorpublic boolean asyncSupported()
asyncSupported in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorasyncSupported in class RecordReaderDataSetIteratorCopyright © 2018. All rights reserved.