作为小白,刚入门开始使用tensorflow库,运行了一下下面的验证代码,发现结果是没错,但中间这堆警告是什么鬼?
import tensorflow as tf
hello = tf.constant('Hello,tensorflow')
sess = tf.Session()
print(sess.run(hello))
经过一些优快云上大神的指点,发现只需在代码前再加上下面两句即可:
#前面加上下面两句
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
运行出来直接没有报错,完美!
原创博客为:https://blog.youkuaiyun.com/qq_36306781/article/details/81254832
官网解释为:https://blog.youkuaiyun.com/hq86937375/article/details/79696023