Mercurial > pylearn
comparison datasets/MNIST.py @ 511:58810b63292b
fixed mnist path
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Thu, 30 Oct 2008 23:27:27 -0400 |
parents | 74b3e65f5f24 |
children |
comparison
equal
deleted
inserted
replaced
510:919125098a3b | 511:58810b63292b |
---|---|
15 Returns two matrices: x, y. x has N rows of 784 columns. Each row of x represents the | 15 Returns two matrices: x, y. x has N rows of 784 columns. Each row of x represents the |
16 28x28 grey-scale pixels in raster order. y is a vector of N integers. Each element y[i] | 16 28x28 grey-scale pixels in raster order. y is a vector of N integers. Each element y[i] |
17 is the label of the i'th row of x. | 17 is the label of the i'th row of x. |
18 | 18 |
19 """ | 19 """ |
20 path = os.path.join(data_root(), 'mnist','mnist.amat') if path is None else path | 20 path = os.path.join(data_root(), 'mnist','mnist_with_header.amat') if path is None else path |
21 | 21 |
22 dat = AMat(path=path, head=n) | 22 dat = AMat(path=path, head=n) |
23 | 23 |
24 try: | 24 try: |
25 assert dat.input.shape[0] == n | 25 assert dat.input.shape[0] == n |