首页 > 解决方案 > 我无法在 Jupyter Notebook 中导入 Keras

问题描述

当我import keras在 Jupyter Notebook 单元中运行时,它会崩溃并显示以下消息:

内核似乎已经死了。它将自动重新启动。

凯拉斯 2.2.0

jupyter 1.0.0
jupyter-client 5.2.3
jupyter-console 5.2.0
jupyter-core 4.4.0
jupyterlab 0.32.1
jupyterlab-launcher 0.10.5

蟒蛇 3.6.6

控制台导入日志

kraamis@debian [~]$ python3
Python 3.6.6 (default, Jun 27 2018, 14:44:17) 
[GCC 8.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
/usr/lib/python3/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
Illegal  instruction


张量流 1.9.0张量流-GPU 1.9.0张
量流-张量板 1.5.1

标签: python-3.xkerasjupyter-notebook

解决方案


问题是我过时的处理器不支持 AVX。必须安装不低于 1.5 的 tensorflow 版本


推荐阅读