Class 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 Detail

      • 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
      • 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
      • 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
    • Constructor Detail

      • MnistDataFetcher

        public MnistDataFetcher​(boolean binarize)
                         throws IOException
        Constructor 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
    • Method Detail

      • fetch

        public void fetch​(int numExamples)
      • reset

        public void reset()
        Specified by:
        reset in interface org.nd4j.linalg.dataset.api.iterator.fetcher.DataSetFetcher
        Overrides:
        reset in class org.nd4j.linalg.dataset.api.iterator.fetcher.BaseDataFetcher
      • next

        public org.nd4j.linalg.dataset.DataSet next()
        Specified by:
        next in interface org.nd4j.linalg.dataset.api.iterator.fetcher.DataSetFetcher
        Overrides:
        next in class org.nd4j.linalg.dataset.api.iterator.fetcher.BaseDataFetcher
      • close

        public void close()