Class MnistDataFetcher
- java.lang.Object
-
- org.nd4j.linalg.dataset.api.iterator.fetcher.BaseDataFetcher
-
- org.deeplearning4j.datasets.fetchers.MnistDataFetcher
-
- All Implemented Interfaces:
Serializable,org.nd4j.linalg.dataset.api.iterator.fetcher.DataSetFetcher
- Direct Known Subclasses:
EmnistDataFetcher
public class MnistDataFetcher extends org.nd4j.linalg.dataset.api.iterator.fetcher.BaseDataFetcher- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanbinarizeprotected static longCHECKSUM_TEST_FEATURESprotected static longCHECKSUM_TEST_LABELSprotected static longCHECKSUM_TRAIN_FEATURESprotected static longCHECKSUM_TRAIN_LABELSprotected static long[]CHECKSUMS_TESTprotected static long[]CHECKSUMS_TRAINprotected booleanfirstShuffleprotected booleanfOrderprotected Stringimagesprotected Stringlabelsprotected MnistManagermanagerstatic intNUM_EXAMPLESstatic intNUM_EXAMPLES_TESTprotected intnumExamplesprotected booleanoneIndexedprotected int[]orderprotected Randomrngprotected booleanshuffleprotected booleantrain
-
Constructor Summary
Constructors Constructor Description MnistDataFetcher()MnistDataFetcher(boolean binarize)Constructor telling whether to binarize the dataset or notMnistDataFetcher(boolean binarize, boolean train, boolean shuffle, long rngSeed, int numExamples)MnistDataFetcher(boolean binarize, boolean train, boolean shuffle, long rngSeed, int numExamples, File topLevelDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidfetch(int numExamples)org.nd4j.linalg.dataset.DataSetnext()voidreset()
-
-
-
Field Detail
-
NUM_EXAMPLES
public static final int NUM_EXAMPLES
- See Also:
- Constant Field Values
-
NUM_EXAMPLES_TEST
public static final int NUM_EXAMPLES_TEST
- See Also:
- Constant Field Values
-
CHECKSUM_TRAIN_FEATURES
protected static final long CHECKSUM_TRAIN_FEATURES
- See Also:
- Constant Field Values
-
CHECKSUM_TRAIN_LABELS
protected static final long CHECKSUM_TRAIN_LABELS
- See Also:
- Constant Field Values
-
CHECKSUM_TEST_FEATURES
protected static final long CHECKSUM_TEST_FEATURES
- See Also:
- Constant Field Values
-
CHECKSUM_TEST_LABELS
protected static final long CHECKSUM_TEST_LABELS
- See Also:
- Constant Field Values
-
CHECKSUMS_TRAIN
protected static final long[] CHECKSUMS_TRAIN
-
CHECKSUMS_TEST
protected static final long[] CHECKSUMS_TEST
-
binarize
protected boolean binarize
-
train
protected boolean train
-
order
protected int[] order
-
rng
protected Random rng
-
shuffle
protected boolean shuffle
-
oneIndexed
protected boolean oneIndexed
-
fOrder
protected boolean fOrder
-
firstShuffle
protected boolean firstShuffle
-
numExamples
protected int numExamples
-
images
protected String images
-
labels
protected String labels
-
manager
protected MnistManager manager
-
-
Constructor Detail
-
MnistDataFetcher
public MnistDataFetcher(boolean binarize) throws IOExceptionConstructor telling whether to binarize the dataset or not- Parameters:
binarize- whether to binarize the dataset or not- Throws:
IOException
-
MnistDataFetcher
public MnistDataFetcher(boolean binarize, boolean train, boolean shuffle, long rngSeed, int numExamples, File topLevelDir) throws IOException- Throws:
IOException
-
MnistDataFetcher
public MnistDataFetcher(boolean binarize, boolean train, boolean shuffle, long rngSeed, int numExamples) throws IOException- Throws:
IOException
-
MnistDataFetcher
public MnistDataFetcher() throws IOException- Throws:
IOException
-
-
Method Detail
-
fetch
public void fetch(int numExamples)
-
reset
public void reset()
- Specified by:
resetin interfaceorg.nd4j.linalg.dataset.api.iterator.fetcher.DataSetFetcher- Overrides:
resetin classorg.nd4j.linalg.dataset.api.iterator.fetcher.BaseDataFetcher
-
next
public org.nd4j.linalg.dataset.DataSet next()
- Specified by:
nextin interfaceorg.nd4j.linalg.dataset.api.iterator.fetcher.DataSetFetcher- Overrides:
nextin classorg.nd4j.linalg.dataset.api.iterator.fetcher.BaseDataFetcher
-
close
public void close()
-
-