Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 855 Bytes

README.md

File metadata and controls

43 lines (29 loc) · 855 Bytes

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.