Theano缺少signal.conv模块

时间:2015-05-21 09:09:01

标签: python theano

我的theano没有signal.conv模块

import theano.tensor.signal.conv
>>AttributeError: 'module' object has no attribute 'conv'

我的theano版本是' 0.7.0'。我尝试升级做pip install theano --upgrade,它告诉我我已经是最新的了。我怎样才能获得转换模块?

PS:我甚至通过sudo pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git更新了开发版,但仍然没有signal.conv !!

如果我theano.tensor.signal.__file__我在同一文件夹中找到文件/usr/local/lib/python2.7/dist-packages/theano/tensor/signal/__init__.pyc的路径我有文件conv.py和downsample.py我可以成功调用theano.tensor.signal.downsample但不能{ {1}}

----在Virtualenv上安装----

我试图在virtualenv上重现错误:

theano.tensor.signal.conv

我使用的是Ubuntu 14.04 64位,python 2.7.6

1 个答案:

答案 0 :(得分:3)

如上面评论中所述,我认为这是由First Time 15480 milliseconds Second Time 10 milliseconds 未隐式导入tensor甚至signal引起的,因此您必须自行导入才能使用它:< / p>

signal.conv

正如您所看到的,导入In [1]: import theano In [2]: theano.tensor Out[2]: <module 'theano.tensor' from '/usr/local/lib/python2.7/site-packages/theano/tensor/__init__.pyc'> 也会获得theano模块,但由于theano.tensor未导入tensor.__init__.py,因此以下内容不起作用:< / p>

signal

导入子模块后,它执行:

In [3]: theano.tensor.signal
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-53b46c46cb25> in <module>()
----> 1 theano.tensor.signal

AttributeError: 'module' object has no attribute 'signal'

In [4]: theano.tensor.signal.conv
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-b2a3482abaed> in <module>()
----> 1 theano.tensor.signal.conv

AttributeError: 'module' object has no attribute 'signal'