Mercurial > pylearn
diff pylearn/datasets/MNIST.py @ 818:f4729745bb58
backporting to 2.4
author | dumitru@deepnets.mtv.corp.google.com |
---|---|
date | Wed, 02 Sep 2009 14:22:02 -0700 |
parents | f30bb746f279 |
children | bfc5914642ce |
line wrap: on
line diff
--- a/pylearn/datasets/MNIST.py Thu Jul 30 18:09:17 2009 -0400 +++ b/pylearn/datasets/MNIST.py Wed Sep 02 14:22:02 2009 -0700 @@ -6,9 +6,9 @@ import os import numpy -from ..io.pmat import PMat -from .config import data_root # config -from .dataset import Dataset +from pylearn.io.pmat import PMat +from pylearn.datasets.config import data_root # config +from pylearn.datasets.dataset import Dataset def head(n=10, path=None): """Load the first MNIST examples. @@ -18,7 +18,8 @@ is the label of the i'th row of x. """ - path = os.path.join(data_root(), 'mnist','mnist_all.pmat') if path is None else path + if path is None: + path = os.path.join(data_root(), 'mnist','mnist_all.pmat') dat = PMat(fname=path)