data-mnist 1.0.0

Download MNIST dataset.


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Download MNIST dataset from http://yann.lecun.com/exdb/mnist/

Usage

Add Setting

Add postGenerateCommands in your dub.json.

{
    "postGenerateCommands": [
        "dub fetch data-mnist",
        "dub run data-mnist"
    ]
}

After that, if you build, files will be created in mnist_data.

An example of load data

import std.file;
import std.path;

auto trainImages = std.file.read(buildNormalizedPath("mnist_data", "train-images-idx3-ubyte"));
auto trainLabels = std.file.read(buildNormalizedPath("mnist_data", "train-labels-idx3-ubyte"));
auto testImages = std.file.read(buildNormalizedPath("mnist_data", "t10k-images-idx1-ubyte"));
auto testLabels = std.file.read(buildNormalizedPath("mnist_data", "t10k-labels-idx1-ubyte"));
Authors:
lempiji
Dependencies:
none
Versions:
1.0.0 2017-Nov-24
~master 2017-Nov-24
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 1 downloads total