GoMNIST is a Go driver for reading Yann LeCun's MNIST dataset of handwritten digits
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data data corruption fix Jan 7, 2013
.gitignore Initial commit Jan 7, 2013
LICENSE add image.Image adapter Mar 20, 2015
README.md add readme Jan 8, 2013
mnist.go add image.Image adapter Mar 20, 2015
mnist_test.go add image.Image adapter Mar 20, 2015
util.go add image.Image adapter Mar 20, 2015

README.md

GoMNIST

GoMNIST is a Go driver for reading Yann LeCun's MNIST dataset of handwritten digits

The MNIST dataset is included. It is a copy from Yann LeCun's MNIST page.

How to use

Install the packages:

% go get github.com/petar/GoMNIST

Import them in your code as

% import "github.com/petar/GoMNIST"

Load the MNIST training and testing data sets into memory using

train, test, err := Load("./data")
if err != nil {
	…
}

Sweep through the samples

sweeper := train.Sweep()
for {
	image, label, present := sweeper.Next()
	if !present {
		break
	}
	…
}

You can also have random access to the sets, using the methods of Set.

Author

My homepage is Petar Maymounkov. Follow me on Twitter at @maymounkov.