您好,欢迎来到二三娱乐。
搜索
您的当前位置:首页The TensorFlow library wasn'

The TensorFlow library wasn'

来源:二三娱乐

MBP 安装好 tensorflow 环境后,程序运行正常,但是出现以下 warnings

2017-05-04 23:21:11.521746: 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-05-04 23:21:11.521765: 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-05-04 23:21:11.521770: 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-05-04 23:21:11.521774: 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-05-04 23:21:11.521778: 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.

关掉这些 warnings,需要添加

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

TF_CPP_MIN_LOG_LEVEL is a TensorFlow environment variable responsible for the logs

  • silence INFO logs set it to 1
  • filter out WARNING set it to 2 (过滤掉程序中的警告)
  • silence ERROR logs (not recommended) set it to 3

Copyright © 2019- yule263.com 版权所有 湘ICP备2023023988号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务