public class CifarDataSetIterator extends RecordReaderDataSetIterator
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 static org.datavec.image.loader.CifarLoader |
loader |
protected int |
numExamples |
protected boolean |
overshot |
protected int |
totalExamples |
protected static boolean |
train |
protected static 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
|
Modifier and Type | Method and Description |
---|---|
boolean |
asyncSupported() |
java.util.List<java.lang.String> |
getLabels() |
boolean |
hasNext() |
org.nd4j.linalg.dataset.DataSet |
next(int batchSize) |
void |
reset() |
void |
test() |
void |
test(int numExamples) |
void |
test(int numExamples,
int batchSize) |
int |
totalExamples() |
void |
train() |
batch, cursor, inputColumns, loadFromMetaData, loadFromMetaData, next, numExamples, remove, resetSupported, setPreProcessor, totalOutcomes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected static int height
protected static int width
protected static int channels
protected static org.datavec.image.loader.CifarLoader loader
protected int totalExamples
protected int numExamples
protected int exampleCount
protected boolean overshot
protected org.datavec.image.transform.ImageTransform imageTransform
protected static boolean useSpecialPreProcessCifar
protected static boolean train
public CifarDataSetIterator(int batchSize, int numExamples, boolean train)
public CifarDataSetIterator(int batchSize, int numExamples, int[] imgDim)
public CifarDataSetIterator(int batchSize, int numExamples, int[] imgDim, boolean train)
public CifarDataSetIterator(int batchSize, int numExamples)
public CifarDataSetIterator(int batchSize, int[] imgDim)
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 org.nd4j.linalg.dataset.DataSet next(int batchSize)
next
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
next
in class RecordReaderDataSetIterator
public boolean hasNext()
hasNext
in interface java.util.Iterator<org.nd4j.linalg.dataset.DataSet>
hasNext
in class RecordReaderDataSetIterator
public int totalExamples()
totalExamples
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
totalExamples
in class RecordReaderDataSetIterator
public void reset()
reset
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
reset
in class RecordReaderDataSetIterator
public java.util.List<java.lang.String> getLabels()
getLabels
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
getLabels
in class RecordReaderDataSetIterator
public boolean asyncSupported()
asyncSupported
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
asyncSupported
in class RecordReaderDataSetIterator
public void train()
public void test()
public void test(int numExamples)
public void test(int numExamples, int batchSize)