本文主要是介绍The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available...,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
跑 tensorflow 官方教程时报warning:
2017-06-08 22:36:18.809242: W tensorflow/core/platform/cpu_feature_guard.cc:45]The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-08 22:36:18.809260: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-08 22:36:18.809263: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-06-08 22:36:18.809266: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-08 22:36:18.809269: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
只需要在相应的.py文件头这样写:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf...
然后就没有问题啦~
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='1' # 这是默认的显示等级,显示所有信息# 2级
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2' # 只显示 warning 和 Error# 3级
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='3' # 只显示 Error
这篇关于The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available...的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!