Package pylearn :: Package datasets :: Module MNIST
[hide private]

Module MNIST

source code

Various routines to load/access MNIST data.

Functions [hide private]
 
head(n=10, path=None)
Load the first MNIST examples.
source code
 
train_valid_test(ntrain=50000, nvalid=10000, ntest=10000, path=None) source code
 
full() source code
 
first_10() source code
 
first_100() source code
 
first_1k() source code
 
first_10k() source code

Imports: os, numpy, PMat, data_root, Dataset


Function Details [hide private]

head(n=10, path=None)

source code 

Load the first MNIST examples.

Returns two matrices: x, y. x has N rows of 784 columns. Each row of x represents the 28x28 grey-scale pixels in raster order. y is a vector of N integers. Each element y[i] is the label of the i'th row of x.