win7 查看tensorBoard

来源:互联网 发布:淘宝大学总裁班价格 编辑:程序博客网 时间:2024/06/03 12:16

win7 查看tensorBoard

  • 将tensorflow变量写入log文件
  • cmd打开
  • 浏览器查看

1

import tensorflow as tfwith tf.name_scope('score'):    score=tf.Variable(36.0,name='score')with tf.name_scope('factor'):    factor=tf.Variable(10.0,name='factor')with tf.name_scope('sqart'):    temp=tf.sqrt(score)with tf.name_scope('new_score'):    new_score=tf.multiply(factor,temp)sess=tf.Session()init_op=tf.global_variables_initializer()sess.run(init_op)result=sess.run(new_score)writer=tf.summary.FileWriter("logs_test/",sess.graph)print (result)sess.close()

2

这里写图片描述

3

打开浏览器,输入localhost:6006
这里写图片描述