天天看点

tensorflow警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX

参考:http://www.bubuko.com/infodetail-2586137.html

大神的前两种方法就不采纳了,直接上第三种方法,个人感觉很好用。

这个警告说你的Tensorflow不能使用SSE4.1 SSE4.2 AVX AVX2 FMA这些指令集进行编译

WARNING:Your CPU supports instructions that this TensorFlow binary was not compiled to > use: SSE4.1 SSE4.2 AVX AVX2 FMA

解决方法

  • 查看自己的python版本
  • 根据自己的操作系统python版本,下载相应的别人编译好的数据命令
  • 在本地安装

第一步:

使用 pthon -V 命令 查看安装pyhon的版本号,我安装的是3.7.2版本的

~~$ python -V
Python 3.7.2
           

第二步:

在https://github.com/lakshayg/tensorflow-build这个网站找到对应的版本,我的操作系统是MacOS Mojave 10.14.3,所以就找到了下面这个版本,download到本地。

tensorflow警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX

第三步:

在终端执行:

sudo pip install --ignore-installed --upgrade  tensorflow-1.13.1-cp37-cp37m-macosx_10_9_x86_64.whl
           

接下来就是等待了,这里说明一下,在安装过程中可能会报错,如下图,在好的网络环境下多试几次应该就能解决。

tensorflow警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX

最后,看到Successfully installed…就是安装成功了。

tensorflow警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX