本文共 685 字,大约阅读时间需要 2 分钟。
import tensorflow as tfwith tf.name_scope("input1"): input1 = tf.constant([1.0, 2.0, 3.0], name="input1")with tf.name_scope("input2"): input2 = tf.Variable(tf.random_uniform([3]), name='input2') # shape = 3output = tf.add_n([input1, input2], name='add') # 实现一个列表的元素的相加,没有广播功能print(output)writer = tf.summary.FileWriter('D:/python/deep-learning/MRI-2D/BMP-cnn/to/log', tf.get_default_graph())writer.close()
(1). 在控制台调用命令:tensorboard --logdir=D:/python/deep-learning/MRI-2D/BMP-cnn/to/log(2). 打开浏览器输入地址 http://zxj-DELL-G7:6006(运行后控制台会显示),默认进入GRAPHS界面,点开上方的INACTIVE选项可以选择其他可视化内容。(3). Tensorboard支持通过TensorFlow命名空间来整理可视化效果图上的节点:TensorFlow计算图中同一个命名空间下的所有节点会被缩略成一个节点(除了顶层命名空间)。
转载地址:http://oakqf.baihongyu.com/