【问题标题】:I can't import Keras in Jupyter Notebook我无法在 Jupyter Notebook 中导入 Keras
【发布时间】:2018-12-30 18:31:05
【问题描述】:

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

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

Keras 2.2.0

jupyter 1.0.0
jupyter 客户端 5.2.3
jupyter 控制台 5.2.0
jupyter-core 4.4.0
jupyterlab 0.32.1
jupyterlab-launcher 0.10.5

Python 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

【问题讨论】:

  • 您是否尝试过重新启动整个 jupyter notebook。另外请检查,如果导入 keras 在你的 python 控制台中工作。
  • 重启笔记本没有帮助。重新启动计算机也没有帮助
  • 添加了控制台日志
  • 你用的是什么版本的tensorflow?
  • 无论如何,谢谢。我会思考,如果我发现了什么,我会在这里写一个答案。从 Google 的搜索来看 - 这是一个常见问题。

标签: python-3.x keras jupyter-notebook


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2023-04-11
    • 2021-01-18
    • 2021-02-09
    • 1970-01-01
    • 2019-08-18
    • 2020-11-06
    • 2018-07-28
    • 2019-08-10
    • 1970-01-01
    相关资源
    最近更新 更多