No dashboards are active for the current data set.解决方案

在使用tensorboard可视化展示tensorflow运行过程中的计算图时,遇到“No dashboards are active for the current data set.”问题

No dashboards are active for the current data set.解决方案_第1张图片

通过搜索网上的一系列解决方案,开始均未将该问题解决

直到仔细回想博主使用tensorboard进行测试时的操作发现,开始操作时博主存放log文件的文件夹是手动创建的,而非用以下测试程序创建的,而后删除手动创建的文件夹,用以下代码中语句进行创建:

writer = tf.summary.FileWriter("logs/", sess.graph)

其中测试代码如下:(参考博文:深度学习7:TensorBoard使用方法)

import tensorflow as tf

with tf.name_scope('graph') as scope:
     matrix1 = tf.constant([[3., 3.]],name ='matrix1')  #1 row by 2 column
     matrix2 = tf.constant([[2.],[2.]],name ='matrix2') # 2 row by 1 column
     product = tf.matmul(matrix1, matrix2,name='product')

sess = tf.Session()

writer = tf.summary.FileWriter("logs/", sess.graph) #第一个参数指定生成文件的目录。

init = tf.global_variables_initializer()

sess.run(init)

并在pycharm界面下方中的terminal面板内输入以下语句:

tensorboard --logdir=logs

详情如下:


将以上链接复制粘贴到Google Chrome(或其他浏览器,亲测可行)即弹出tensorboard界面,如下所示:

No dashboards are active for the current data set.解决方案_第2张图片

 

你可能感兴趣的:(深度学习,深度学习,tensorboard)