Mercurial > pylearn
comparison datasets/MNIST.py @ 514:a4d34dad3083
merged
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Fri, 31 Oct 2008 11:08:25 -0400 |
parents | 58810b63292b |
children |
comparison
equal
deleted
inserted
replaced
513:6103dc5d2a0d | 514:a4d34dad3083 |
---|---|
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 |