Theano 脚本将无法运行。例如,我尝试在 Jupyter Notebook 中运行以下代码,但收到一条消息说我的内核已死亡。重新启动内核也没有帮助。该错误不仅限于此脚本,还包括我尝试使用 Theano 运行的任何脚本。
这是确切的错误消息:
The kernel appears to have died. It will restart automatically."
我正在使用 Anaconda,Python 2.7.11,64 位。 CPU 和 GPU 都会出现此问题。
import theano
from theano import tensor as T
# Basic expressions and calculus
x = T.dscalar('x')
y = T.dscalar('y')
z = x*x + y*y
f = theano.function([x,y], z)
theano 设置摘要:
浮点32,CPU
最佳答案
Theano 安装似乎有问题。尝试卸载然后安装最新版本 (pip install git+git://github.com/Theano/Theano.git
),看看问题是否仍然存在。
关于python - 需要帮助确定为什么我的 Theano 脚本无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37353104/