Theano的一个关于signal,signal/conv,signal/downsample的错误
2016-01-28 22:20
295 查看
安装了Theano和keras之后,准备走段代码出错了,大概意思是:
“Theano is missing signal”,就是说signal模块找不到,我跑到
源代码目录下看是有这个的:
明明有的啊,流泪!!!
只好googl了一下,发现也有人跟我差不多的问题:
Best Answer:
As you can see importing theano also gets us the theano.tensor module, but as tensor.init.py doesn’t import signal for example, the following does not work:
就是说,上层的_init_没有显示的进行import
于是修改文件,tensor/init.py,
最后一行加入:
此时再次导入,成功:
我以为一切正常了,谁知道生活又开了个玩笑,是的又出错啦:
说的是signal没有conv和downsample,流泪了!!!
跟上面方法一样,这次修改了init.py,显示导入:
这次倒好,直接import theano都出错了!!!!
最后发现可以在代码里面显示的导入上面两行,代码运行正常。
PS:
好像这个错,过几天无故就没了,我的就是过了几天不显示导入都可以直接运行,也不知道是什么原因
有知道的大侠们,烦请告知我一下哈!
“Theano is missing signal”,就是说signal模块找不到,我跑到
源代码目录下看是有这个的:
明明有的啊,流泪!!!
只好googl了一下,发现也有人跟我差不多的问题:
Best Answer:
As you can see importing theano also gets us the theano.tensor module, but as tensor.init.py doesn’t import signal for example, the following does not work:
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'
就是说,上层的_init_没有显示的进行import
于是修改文件,tensor/init.py,
最后一行加入:
from theano.tensor import signal
此时再次导入,成功:
我以为一切正常了,谁知道生活又开了个玩笑,是的又出错啦:
AttributeError: 'module' object has no attribute 'conv' AttributeError: 'module' object has no attribute 'downsample'
说的是signal没有conv和downsample,流泪了!!!
跟上面方法一样,这次修改了init.py,显示导入:
from theano.tensor.signal import conv from theano.tensor.signal import downsample
这次倒好,直接import theano都出错了!!!!
最后发现可以在代码里面显示的导入上面两行,代码运行正常。
PS:
好像这个错,过几天无故就没了,我的就是过了几天不显示导入都可以直接运行,也不知道是什么原因
有知道的大侠们,烦请告知我一下哈!
相关文章推荐
- 写在开始编写Java之前(2)——Java的环境
- TryLock使用方式
- 项目中有大量第三方js文件时导致Eclipse检查js很慢的问题(如何禁用Eclipse检查js)
- Lua学习笔记2--变量域和流程控制
- 字典树
- 1037. 在霍格沃茨找零钱(20)
- request对象
- 安装jdk1.8
- Good Bye 2015 A
- 联系人数据库contacts2.db介绍
- android网络交互
- 2分钟读懂Hadoop和Spark的异同
- yii2 命名空间
- The Java™ Tutorials — Generics :Upper Bounded Wildcards 受上限控制的通配符
- 1035. 插入与归并(25)
- 1036. 跟奥巴马一起编程(15)
- 白书练习 高精度阶乘
- HDU 2199 Can you solve this equation?(二分搜索)
- jQuery第六章
- 使用js中断表单的提交动作的方法