1. 程式人生 > >報錯解決——Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

報錯解決——Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

解決方法 bsp color extension ron img 寫入 hid 默認

  

  在導入tensorflow後,進行運算時,出現了報錯Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

  解決方法:在最頂行寫入以下代碼即可

import os
os.environ[TF_CPP_MIN_LOG_LEVEL] = 2 

參考資料:Advanced Vector Extensions

技術分享圖片
import os  
os.environ["TF_CPP_MIN_LOG_LEVEL"]=1 # 這是默認的顯示等級,顯示所有信息  
os.environ["TF_CPP_MIN_LOG_LEVEL"]=2 # 只顯示 warning 和 Error os.environ["TF_CPP_MIN_LOG_LEVEL"]=3 # 只顯示 Error
View Code

報錯解決——Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2