public class MnistDataFetcher extends BaseDataFetcher
Modifier and Type | Field and Description |
---|---|
protected boolean |
binarize |
protected MnistManager |
man |
protected static java.lang.String |
MNIST_ROOT |
static int |
NUM_EXAMPLES |
static int |
NUM_EXAMPLES_TEST |
protected int[] |
order |
protected java.util.Random |
rng |
protected boolean |
shuffle |
protected static java.lang.String |
TEMP_ROOT |
protected boolean |
train |
curr, cursor, inputColumns, log, numOutcomes, totalExamples
Constructor and Description |
---|
MnistDataFetcher() |
MnistDataFetcher(boolean binarize)
Constructor telling whether to binarize the dataset or not
|
MnistDataFetcher(boolean binarize,
boolean train,
boolean shuffle,
long rngSeed) |
Modifier and Type | Method and Description |
---|---|
void |
fetch(int numExamples)
Fetches the next dataset.
|
org.nd4j.linalg.dataset.DataSet |
next()
Returns the next data applyTransformToDestination
|
void |
reset()
Returns the fetcher back to the beginning of the dataset
|
createInputMatrix, createOutputMatrix, createOutputVector, cursor, getLabelName, hasMore, initializeCurrFromList, inputColumns, setLabelNames, totalExamples, totalOutcomes
public static final int NUM_EXAMPLES
public static final int NUM_EXAMPLES_TEST
protected static final java.lang.String TEMP_ROOT
protected static final java.lang.String MNIST_ROOT
protected transient MnistManager man
protected boolean binarize
protected boolean train
protected int[] order
protected java.util.Random rng
protected boolean shuffle
public MnistDataFetcher(boolean binarize) throws java.io.IOException
binarize
- whether to binarize the dataset or notjava.io.IOException
public MnistDataFetcher(boolean binarize, boolean train, boolean shuffle, long rngSeed) throws java.io.IOException
java.io.IOException
public MnistDataFetcher() throws java.io.IOException
java.io.IOException
public void fetch(int numExamples)
DataSetFetcher
DataSetFetcher.next()
just returns the last data applyTransformToDestination fetchnumExamples
- the number of examples to fetchpublic void reset()
DataSetFetcher
reset
in interface DataSetFetcher
reset
in class BaseDataFetcher
public org.nd4j.linalg.dataset.DataSet next()
DataSetFetcher
next
in interface DataSetFetcher
next
in class BaseDataFetcher