这是我用Python写的一段代码:
import tensorflow as tf
num1 = tf.constant(11.0)
num2 = tf.constant(12.0)
res = tf.add(num1, num2)
TensorFlow运行需要通过一个会话来运行
with tf.Session() as sess:
print(sess.run(res))
# 在会话中将图序列化到events文件中
file_writer = tf.summary.FileWriter("summary", tf.get_default_graph())
运行结果:
23.0
在以下路径生成文件:E:\Python\deep_learning\summary
在Terminal中运行:
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。**
E:\Python\deep_learning>cd E:\Python\deep_learning\summary
E:\Python\deep_learning\summary>tensorboard --logdir=summary
TensorBoard 1.12.2 at http://OALTIVZ27R3T2EB:6006 (Press CTRL+C to quit)
在360浏览器(谷歌中也打不开)中打开网址:
出现这个结果:
我自己看了一些别人的帖子,但还是没有解决。。。
望哪位大神解惑。。。