Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

导入tensorflow并调用其函数后遇到 Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 

原因是下载TensorFlow的版本不支持cpu的AVX2指令编译  

解决办法:

1、卸载当前tensorflow版本,重新下载正确版本的tensorflow 。重新下载感觉太麻烦 所以我选择忽略此警告。。。 (希望不要因此出问题

2、忽略此警告

进入python后输入

 import os
 os.environ[‘TF_CPP_MIN_LOG_LEVEL‘] = ‘2‘

可以通过修改环境变量中日志打印等级,来消除烦人打印

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2_第1张图片

你可能感兴趣的:(疑难杂症)