# HG changeset patch # User Olivier Delalleau # Date 1314898515 14400 # Node ID 0f326860210e71889437bb06b928428fef6b60dc # Parent 3d4615ee96a4fa0772a38bd4b7d4a29527f2ecd0# Parent 93b8373c6735039a5b8299c6e0d0c0985a141c76 Merged diff -r 3d4615ee96a4 -r 0f326860210e pylearn/algorithms/sparse_coding.py --- a/pylearn/algorithms/sparse_coding.py Thu Sep 01 13:35:02 2011 -0400 +++ b/pylearn/algorithms/sparse_coding.py Thu Sep 01 13:35:15 2011 -0400 @@ -152,8 +152,8 @@ if __name__ == '__main__': logging.basicConfig(stream=sys.stderr) - logging.getLogger('main').setLevel(logging.INFO) - logging.getLogger('main').info('hello') + logging.getLogger('pylearn.algorithms.sparse_coding.main').setLevel(logging.INFO) + logging.getLogger('pylearn.algorithms.sparse_coding.main').info('hello') # load olshausen images reproduce_olshausen() diff -r 3d4615ee96a4 -r 0f326860210e pylearn/dataset_ops/__init__.py --- a/pylearn/dataset_ops/__init__.py Thu Sep 01 13:35:02 2011 -0400 +++ b/pylearn/dataset_ops/__init__.py Thu Sep 01 13:35:15 2011 -0400 @@ -1,4 +1,4 @@ import logging -logging.getLogger('dataset_ops').setLevel(logging.INFO) +logging.getLogger('pylearn.dataset_ops').setLevel(logging.INFO) from protocol import Dataset, TensorDataset, TensorFnDataset # protocol.py diff -r 3d4615ee96a4 -r 0f326860210e pylearn/datasets/config.py --- a/pylearn/datasets/config.py Thu Sep 01 13:35:02 2011 -0400 +++ b/pylearn/datasets/config.py Thu Sep 01 13:35:15 2011 -0400 @@ -41,14 +41,16 @@ if roots is None: roots = [data_root()] else: - roots = roots.split(':') - roots2 = [] - #remove directory that don't exist - for root in roots: - if os.path.exists(root): - roots2.append(root) - data_roots.rval = roots2 - return roots2 + # Note that under Windows, we cannot use ':' as a delimiter because + # paths may contain this character. Thus we use ';' instead (similar to + # the PATH environment variable in Windows). + if sys.platform == 'win32': + roots = roots.split(';') + else: + roots = roots.split(':') + # Remove paths that are not directories. + data_roots.rval = [r for r in roots if os.path.isdir(r)] + return data_roots.rval def get_filepath_in_roots(*names): diff -r 3d4615ee96a4 -r 0f326860210e pylearn/gd/sgd.py --- a/pylearn/gd/sgd.py Thu Sep 01 13:35:02 2011 -0400 +++ b/pylearn/gd/sgd.py Thu Sep 01 13:35:15 2011 -0400 @@ -79,7 +79,10 @@ raise TypeError('stepsize must be a scalar', stepsize) self.params = params - self.gparams = [theano.tensor.grad(cost, self.params)] if gradients is None else gradients + if gradients is None: + self.gparams = [theano.tensor.grad(cost, self.params)] + else: + self.gparams = gradients assert len(self.params) == len(self.gparams) self._updates = (dict((p, p - self.stepsize * g) for p, g in zip(self.params, self.gparams))) diff -r 3d4615ee96a4 -r 0f326860210e pylearn/shared/layers/util.py --- a/pylearn/shared/layers/util.py Thu Sep 01 13:35:02 2011 -0400 +++ b/pylearn/shared/layers/util.py Thu Sep 01 13:35:15 2011 -0400 @@ -27,7 +27,7 @@ """ if name is None: - name = "layers.%s" % cls.__name__ + name = "pylearn.shared.layers.%s" % cls.__name__ cls._logger = logging.getLogger(name) if level: try: