import os
import tensorflow as tf
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
在tensorflow0.12以上版本中有效,其中:
- 0 = all messages are logged (default behavior)
- 1 = INFO messages are not printed
- 2 = INFO and WARNING messages are not printed
- 3 = INFO, WARNING, and ERROR messages are not printed

本文介绍如何在TensorFlow环境中通过设置环境变量TF_CPP_MIN_LOG_LEVEL来调整日志的输出级别,实现对不同严重级别的消息进行过滤。
3733

被折叠的 条评论
为什么被折叠?



