我的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
答案 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'