No dashboards are active for the current data set.

在使用tensorboard的时候,报了No dashboards are active for the current data set.,弄了一上午,差点没给我恶心吐了,先说一下我这儿的环境

  • window10
  • pycharm
  • chrome
  • tensorflow 2.1.0
  • pytorch 1.5.1
  • tensorboard 2.2.2
  • tensorboardX

写一个简单的例子

from tensorboardX import SummaryWriter
writer = SummaryWriter(comment='example1')
for i in range(10):
    writer.add_scalar('quadratic', i**2, global_step=i)
    writer.add_scalar('exponential', 2**i, global_step=i)

然后在terminal当前目录环境下输入

tensorboard --logdir runs

No dashboards are active for the current data set._第1张图片
就会出现一个链接,点进去
No dashboards are active for the current data set._第2张图片
在这里插入图片描述
然后我就从网上开始找问题,什么路径名有问题,不能用等于号,给路径加" ",然后还得写什么mylogs:D:/……各种方法全试了一遍,全都不行
1. List item
最后我点开那个event文件一看,
No dashboards are active for the current data set._第3张图片
woc尼玛是空的???

然后发现是
程序没有关闭writer,忘记加

writer.close()

No dashboards are active for the current data set._第4张图片
No dashboards are active for the current data set._第5张图片
之后就可以正常使用了
No dashboards are active for the current data set._第6张图片
No dashboards are active for the current data set._第7张图片
最后顺带提一嘴路径的问题

经测试以下几种写法均可
No dashboards are active for the current data set._第8张图片
No dashboards are active for the current data set._第9张图片
要是实在报错,直接把完整路径输进去,最省事

你可能感兴趣的:(ML&DL,tensorflow,pytorch,深度学习)