diff datasets/MNIST.py @ 505:74b3e65f5f24

added smallNorb dataset, switched to PYLEARN_DATA_ROOT
author James Bergstra <bergstrj@iro.umontreal.ca>
date Wed, 29 Oct 2008 17:09:04 -0400
parents 19ab9ce916e3
children 58810b63292b
line wrap: on
line diff
--- a/datasets/MNIST.py	Wed Oct 29 11:38:49 2008 -0400
+++ b/datasets/MNIST.py	Wed Oct 29 17:09:04 2008 -0400
@@ -3,11 +3,11 @@
 """
 from __future__ import absolute_import
 
+import os
 import numpy
 
 from ..amat import AMat
-
-from .config import MNIST_amat
+from .config import data_root
 
 def head(n=10, path=None):
     """Load the first MNIST examples.
@@ -17,7 +17,7 @@
     is the label of the i'th row of x.
     
     """
-    path = MNIST_amat if path is None else path
+    path = os.path.join(data_root(), 'mnist','mnist.amat') if path is None else path
 
     dat = AMat(path=path, head=n)