public class EmnistDataSetIterator
extends org.nd4j.linalg.dataset.api.iterator.BaseDatasetIterator
MnistDataSetIterator), with 6 different splits/
variants, specified by EmnistDataSetIterator.Set:MnistDataSetIterator| Modifier and Type | Class and Description |
|---|---|
static class |
EmnistDataSetIterator.Set
EMNIST dataset has multiple different subsets.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
batch |
protected EmnistDataSetIterator.Set |
dataSet |
protected int |
numExamples |
protected org.nd4j.linalg.dataset.api.DataSetPreProcessor |
preProcessor |
| Constructor and Description |
|---|
EmnistDataSetIterator(EmnistDataSetIterator.Set dataSet,
int batch,
boolean train) |
EmnistDataSetIterator(EmnistDataSetIterator.Set dataSet,
int batch,
boolean binarize,
boolean train,
boolean shuffle,
long rngSeed)
Get the specified number of MNIST examples (test or train set), with optional shuffling and binarization.
|
EmnistDataSetIterator(EmnistDataSetIterator.Set dataSet,
int batchSize,
boolean train,
long seed) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getLabels()
Get the labels as a List
|
static List<String> |
getLabels(EmnistDataSetIterator.Set dataSet)
Get the label assignments for the given set as a List
|
static char[] |
getLabelsArray(EmnistDataSetIterator.Set dataSet)
Get the label assignments for the given set as a character array.
|
char[] |
getLabelsArrays()
Get the labels as a character array
|
static boolean |
isBalanced(EmnistDataSetIterator.Set dataSet)
Are the labels balanced in the training set (that is: are the number of examples for each label equal?)
|
static int |
numExamplesTest(EmnistDataSetIterator.Set dataSet)
Get the number of test examples for the specified subset
|
static int |
numExamplesTrain(EmnistDataSetIterator.Set dataSet)
Get the number of training examples for the specified subset
|
static int |
numLabels(EmnistDataSetIterator.Set dataSet)
Get the number of labels for the specified subset
|
asyncSupported, batch, cursor, getPreProcessor, hasNext, inputColumns, next, next, numExamples, remove, reset, resetSupported, setPreProcessor, totalExamples, totalOutcomesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected EmnistDataSetIterator.Set dataSet
protected int batch
protected int numExamples
protected org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor
public EmnistDataSetIterator(EmnistDataSetIterator.Set dataSet, int batch, boolean train) throws IOException
IOExceptionpublic EmnistDataSetIterator(EmnistDataSetIterator.Set dataSet, int batchSize, boolean train, long seed) throws IOException
IOExceptionpublic EmnistDataSetIterator(EmnistDataSetIterator.Set dataSet, int batch, boolean binarize, boolean train, boolean shuffle, long rngSeed) throws IOException
batch - Size of each patchbinarize - whether to binarize the data or not (if false: normalize in range 0 to 1)train - Train vs. test setshuffle - whether to shuffle the examplesrngSeed - random number generator seed to use when shuffling examplesIOExceptionpublic static int numExamplesTrain(EmnistDataSetIterator.Set dataSet)
dataSet - Subset to getpublic static int numExamplesTest(EmnistDataSetIterator.Set dataSet)
dataSet - Subset to getpublic static int numLabels(EmnistDataSetIterator.Set dataSet)
dataSet - Subset to getpublic char[] getLabelsArrays()
public List<String> getLabels()
getLabels in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorgetLabels in class org.nd4j.linalg.dataset.api.iterator.BaseDatasetIteratorpublic static char[] getLabelsArray(EmnistDataSetIterator.Set dataSet)
dataSet - DataSet to get the label assignment forpublic static List<String> getLabels(EmnistDataSetIterator.Set dataSet)
dataSet - DataSet to get the label assignment forpublic static boolean isBalanced(EmnistDataSetIterator.Set dataSet)
dataSet - Set to get balanced value forCopyright © 2018. All rights reserved.