changeset 1483:4727a7e4d506

modified Caltech Silhouettes dataset to use config.get_filepath_in_roots mechanism.
author gdesjardins
date Tue, 05 Jul 2011 10:58:19 -0400
parents be4a49a65333
children 83d3c9ee6d65
files pylearn/datasets/caltech.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/datasets/caltech.py	Tue Jul 05 10:56:40 2011 -0400
+++ b/pylearn/datasets/caltech.py	Tue Jul 05 10:58:19 2011 -0400
@@ -8,13 +8,14 @@
 from pylearn.io.pmat import PMat
 from pylearn.datasets.config import data_root # config
 from pylearn.datasets.dataset import Dataset
+import config
 
 def caltech_silhouette():
 
     rval = Dataset()
 
-    
-    path = os.path.join(data_root(), 'caltech_silhouettes')
+    # dataset lookup through $PYLEARN_DATA_ROOT
+    path = config.get_filepath_in_roots('caltech_silhouettes')
 
     rval.train = Dataset.Obj(x=numpy.load(os.path.join(path,'train_data.npy')),
                              y=numpy.load(os.path.join(path,'train_labels.npy')))