data-mnist ~master

Download MNIST dataset.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

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

  • 69 downloads total

Score:
0.5
Short URL:
data-mnist.dub.pm