changeset 1510:07b48bd449cd

Make a dataset ops use the new path system.
author Frederic Bastien <nouiz@nouiz.org>
date Mon, 12 Sep 2011 11:47:00 -0400
parents b709f6b53b17
children 9ffe5d6faee3
files pylearn/dataset_ops/image_patches.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/dataset_ops/image_patches.py	Mon Sep 12 11:46:27 2011 -0400
+++ b/pylearn/dataset_ops/image_patches.py	Mon Sep 12 11:47:00 2011 -0400
@@ -2,7 +2,6 @@
 import theano
 
 from pylearn.datasets.image_patches import  (
-        data_root,
         olshausen_field_1996_whitened_images,
         extract_random_patches)
 
@@ -11,6 +10,7 @@
 
 import scipy.io
 from pylearn.io import image_tiling
+from pylearn.datasets.config import get_filepath_in_roots
 
 @memo
 def get_dataset(N,R,C,dtype,center,unitvar):
@@ -58,8 +58,8 @@
 @memo
 def ranzato_hinton_2010(path=None):
     if path is None:
-        path = os.path.join(data_root(), 'image_patches', 'mcRBM',
-                'training_colorpatches_16x16_demo.mat')
+        path = get_filepath_in_roots(os.path.join('image_patches', 'mcRBM',
+                'training_colorpatches_16x16_demo.mat'))
     dct = scipy.io.loadmat(path)
     return dct
 def ranzato_hinton_2010_whitened_patches(path=None):