please help to run pylearn2
Amila Deepal
d.a.a.deepal at gmail.com
Fri Feb 27 06:03:32 EST 2015
I try to run pylearn2 tutorial: Softmax regression using my notebook.
but i run
from pylearn2.config import yaml_parse
train = yaml_parse.load(train)
train.main_loop()
this code in my notebook i got Error.How to solve this
Please help
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-a29d25125a51> in <module>()
1 from pylearn2.config import yaml_parse
----> 2 train = yaml_parse.load(train)
3 train.main_loop()
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/config/yaml_parse.pyc in load(stream, environ, instantiate, **kwargs)
209 string = stream.read()
210
--> 211 proxy_graph = yaml.load(string, **kwargs)
212 if instantiate:
213 return _instantiate(proxy_graph)
/usr/lib/python2.7/dist-packages/yaml/__init__.pyc in load(stream, Loader)
69 loader = Loader(stream)
70 try:
---> 71 return loader.get_single_data()
72 finally:
73 loader.dispose()
/usr/lib/python2.7/dist-packages/yaml/constructor.pyc in get_single_data(self)
37 node = self.get_single_node()
38 if node is not None:
---> 39 return self.construct_document(node)
40 return None
41
/usr/lib/python2.7/dist-packages/yaml/constructor.pyc in construct_document(self, node)
41
42 def construct_document(self, node):
---> 43 data = self.construct_object(node)
44 while self.state_generators:
45 state_generators = self.state_generators
/usr/lib/python2.7/dist-packages/yaml/constructor.pyc in construct_object(self, node, deep)
88 data = constructor(self, node)
89 else:
---> 90 data = constructor(self, tag_suffix, node)
91 if isinstance(data, types.GeneratorType):
92 generator = data
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/config/yaml_parse.pyc in multi_constructor_obj(loader, tag_suffix, node)
356 yaml_src = yaml.serialize(node)
357 construct_mapping(node)
--> 358 mapping = loader.construct_mapping(node)
359
360 assert hasattr(mapping, 'keys')
/usr/lib/python2.7/dist-packages/yaml/constructor.pyc in construct_mapping(self, node, deep)
206 if isinstance(node, MappingNode):
207 self.flatten_mapping(node)
--> 208 return BaseConstructor.construct_mapping(self, node, deep=deep)
209
210 def construct_yaml_null(self, node):
/usr/lib/python2.7/dist-packages/yaml/constructor.pyc in construct_mapping(self, node, deep)
131 raise ConstructorError("while constructing a mapping", node.start_mark,
132 "found unacceptable key (%s)" % exc, key_node.start_mark)
--> 133 value = self.construct_object(value_node, deep=deep)
134 mapping[key] = value
135 return mapping
/usr/lib/python2.7/dist-packages/yaml/constructor.pyc in construct_object(self, node, deep)
88 data = constructor(self, node)
89 else:
---> 90 data = constructor(self, tag_suffix, node)
91 if isinstance(data, types.GeneratorType):
92 generator = data
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/config/yaml_parse.pyc in multi_constructor_obj(loader, tag_suffix, node)
370 callable = eval(tag_suffix)
371 else:
--> 372 callable = try_to_import(tag_suffix)
373 rval = Proxy(callable=callable, yaml_src=yaml_src, positionals=(),
374 keywords=mapping)
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/config/yaml_parse.pyc in try_to_import(tag_suffix)
297 base_msg += ' but could import %s' % modulename
298 reraise_as(ImportError(base_msg + '. Original exception: '
--> 299 + str(e)))
300 j += 1
301 try:
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/utils/exc.pyc in reraise_as(new_exc)
88 new_exc.__cause__ = orig_exc_value
89 new_exc.reraised = True
---> 90 six.reraise(type(new_exc), new_exc, orig_exc_traceback)
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/config/yaml_parse.pyc in try_to_import(tag_suffix)
290 modulename = '.'.join(pcomponents[:j])
291 try:
--> 292 exec('import %s' % modulename)
293 except Exception:
294 base_msg = 'Could not import %s' % modulename
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/config/yaml_parse.pyc in <module>()
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/models/softmax_regression.py in <module>()
13 __maintainer__ = "LISA Lab"
14
---> 15 from pylearn2.models import mlp
16
17 class SoftmaxRegression(mlp.MLP):
/home/amila/Documents/Algorithm/git/pylearn2/pylearn2/models/mlp.py in <module>()
20 from theano.gof.op import get_debug_values
21 from theano.sandbox.rng_mrg import MRG_RandomStreams
---> 22 from theano.sandbox.cuda.dnn import dnn_available, dnn_pool
23 from theano.tensor.signal.downsample import max_pool_2d
24 import theano.tensor as T
ImportError: Could not import pylearn2.models.softmax_regression but could import pylearn2.models. Original exception: No module named dnn
Original exception:
ImportError: No module named dnn
More information about the Python-list
mailing list