![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow
不要绝望总会慢慢变强
当你觉得整个世界都放弃了你,还有那几行代码值得你珍重!
展开
-
tensorflow基础知识
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf tf.compat.v1.disable_eager_execution() a = tf.constant([[1.0,2.0]]) b = tf.constant([[2.0],[3.0]]) result = tf.matmul(a,b) print(result) #tf.Tensor([[8.]], shape=(1, 1), dtype=fl...原创 2020-09-14 11:29:22 · 193 阅读 · 0 评论 -
屏蔽tensorflow输出一般和警告信息
装完tensorflow后控制台输出一大串的警告和一般信息,主要用了两行代码解决 import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' #设置为1屏蔽一般信息,2屏蔽一般和警告,3屏蔽所有输出 import tensorflow as tf a = tf.constant(2.) b = tf.constant(4.) print(a * b)原创 2020-09-14 10:33:52 · 1328 阅读 · 1 评论