使用tensorflow 进行训练时,有时会出现这样的错误:
2019-04-15 16:21:14.428855: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\35\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
具体意思是:你的CPU支持这个TensorFlow二进制文件的指令 未编译使用:AVX AVX2
解决方案
加入一下代码:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
运行一下,发现没报错了。