【发布时间】:2019-05-12 09:20:15
【问题描述】:
我正在尝试在我的 Chromebook 上安装 TensorFlow,我知道这不是最好的地方,但我只是想感受一下。我在 Python 开发环境或任何开发环境中没有做太多工作,所以请耐心等待。 搞清楚pip后,我安装TensorFlow并尝试导入它,收到这个错误:
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2018-12-11 06:09:54.960546: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.
Aborted (core dumped)
经过一番研究,我发现我的处理器(Intel Celeron N2840(Bay Trail-M 架构))不支持 AVX 指令,所以我想知道是否有办法使用为其他指令编译的版本放。 Cog 告诉我,我可以使用 MMX 和各种 SSE(不管是什么意思)。
附:这有点像TensorFlow error using AVX instructions on Linux while working on Windows on the same machine 的重复,但不完全是。另外,我无法发表评论,因为我没有 50 声望。
附言我看着How to compile Tensorflow with SSE4.2 and AVX instructions? 吓了一跳
【问题讨论】:
-
如果你不介意使用旧版本,TF 直到 1.5 版才使用 AVX 指令编译,所以如果你安装那个,你会尝试一些东西(并错过很多更多)
-
否则,您要么需要从源代码构建它,要么尝试从某人那里搜索非官方的轮子,因为 TF 现在只支持带 AVX 的 CPU
-
@GPhilo 我可以通过 pip 获得以前的版本,还是需要使用其他东西?
-
pip install tensorflow=1.5 -
@GPhilo 你缺少一个等号:
pip install tensorflow==1.5
标签: python tensorflow avx