changeset 1427:a36d3a406c59

fix whitespace/indentation.
author Frederic Bastien <nouiz@nouiz.org>
date Tue, 08 Feb 2011 12:34:07 -0500
parents 4988f8ea0836
children 3823dbfff6cf
files pylearn/datasets/utlc.py
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/datasets/utlc.py	Tue Feb 08 12:33:33 2011 -0500
+++ b/pylearn/datasets/utlc.py	Tue Feb 08 12:34:07 2011 -0500
@@ -1,4 +1,4 @@
-""" 
+"""
 user should use the load _ndarray_dataset or load_sparse_dataset function
 
 See the file ${PYLEARN_DATA_ROOT}/UTCL/README for detail on the datasets.
@@ -19,7 +19,7 @@
 def load_ndarray_dataset(name, normalize=True, transfer=False, normalize_on_the_fly=False):
     """ Load the train,valid,test data for the dataset `name`
         and return it in ndarray format.
-    
+
     :param normalize: If True, we normalize the train dataset
                       before returning it
     :param transfer: If True also return the transfer label
@@ -35,7 +35,7 @@
                                  be able to use rita and harry with 1G per jobs.
     """
     assert not (normalize and normalize_on_the_fly), "Can't normalize in 2 way at the same time!"
-    
+
     assert name in ['avicenna','harry','rita','sylvester','ule']
     common = os.path.join('UTLC','filetensor',name+'_')
     trname,vname,tename = [config.get_filepath_in_roots(common+subset+'.ft.gz',
@@ -77,7 +77,7 @@
             std = 0.69336046033925791#train.std()slow to compute
             train /= std
             valid /= std
-            test /= std  
+            test /= std
         elif name == "rita":
             v = numpy.asarray(230, dtype=theano.config.floatX)
             train /= v
@@ -94,7 +94,7 @@
 def load_sparse_dataset(name, normalize=True, transfer=False):
     """ Load the train,valid,test data for the dataset `name`
         and return it in sparse format.
-    
+
     :param normalize: If True, we normalize the train dataset
                       before returning it
     :param transfer: If True also return the transfer label
@@ -102,7 +102,7 @@
     assert name in ['harry','terry','ule']
     trname,vname,tename = [os.path.join(config.data_root(),
                                         'UTLC','sparse',
-                                        name+'_'+subset+'.npy') 
+                                        name+'_'+subset+'.npy')
                            for subset in ['train','valid','test']]
     train = load_sparse(trname)
     valid = load_sparse(vname)
@@ -119,7 +119,7 @@
             std = 0.69336046033925791#train.std()slow to compute
             train = (train) / std
             valid = (valid) / std
-            test = (test) / std  
+            test = (test) / std
         elif name == "terry":
             train = train.astype(theano.config.floatX)
             valid = valid.astype(theano.config.floatX)
@@ -134,17 +134,17 @@
         return train, valid, test, transfer
     else:
         return train, valid, test
-    
+
 def load_ndarray_label(name):
     """ Load the train,valid,test data for the dataset `name`
         and return it in ndarray format.
-    
+
         This is only available for the toy dataset ule.
     """
     assert name in ['ule']
     trname,vname,tename = [os.path.join(config.data_root(),
                                         'UTLC','filetensor',
-                                        name+'_'+subset+'.ft') 
+                                        name+'_'+subset+'.ft')
                            for subset in ['trainl','validl','testl']]
     trainl = load_filetensor(trname)
     validl = load_filetensor(vname)
@@ -222,4 +222,3 @@
         assert scipy.sparse.issparse(valid)
         assert scipy.sparse.issparse(test)
         assert train.shape[1]==test.shape[1]==valid.shape[1]
-