天天看點

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