tensorfolw运行中出现warn警告,禁止打印方法

来源:互联网 发布:相对湿度数据下载 编辑:程序博客网 时间:2024/06/17 17:24

2017-07-25 10:40:29.051142: 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-07-25 10:40:29.051175: 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-07-25 10:40:29.051180: 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-07-25 10:40:29.051183: 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-07-25 10:40:29.051187: 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 computati
ons.
可以通过下列方法禁止打印:

import osos.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  
阅读全文
1 0