changeset 1482:be4a49a65333

modified Nade dataset to use new config.get_filepath_in_roots mechanism
author gdesjardins
date Tue, 05 Jul 2011 10:56:40 -0400
parents 444222497167
children 4727a7e4d506
files pylearn/datasets/nade.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/datasets/nade.py	Wed Jun 22 16:20:16 2011 -0400
+++ b/pylearn/datasets/nade.py	Tue Jul 05 10:56:40 2011 -0400
@@ -4,6 +4,7 @@
 from pylearn.io.pmat import PMat
 from pylearn.datasets.config import data_root # config
 from pylearn.datasets.dataset import Dataset
+import config
 
 def load_dataset(name=None):
     """
@@ -26,8 +27,10 @@
     assert name in ['adult','binarized_mnist', 'mnist', 'connect4','dna',
                     'mushrooms','nips','ocr_letters','rcv1','web']
     rval = Dataset()
-    
-    path = os.path.join(data_root(), 'larocheh', name)
+
+    # dataset lookup through $PYLEARN_DATA_ROOT
+    _path = os.path.join('larocheh', name)
+    path = config.get_filepath_in_roots(_path)
 
     # load training set
     x=numpy.load(os.path.join(path,'train_data.npy'))