如何解决PyTorch Tensorboard中的“投影仪”选项卡为空白
我正在尝试可视化每个时期的嵌入。但是“投影仪”页面显示了此内容-
这是页面上的文字-
No checkpoint was found.
Probable causes:
No checkpoint has been saved yet. Please refresh the page periodically.
You are not saving any checkpoint. To save your model,create a tf.train.Saver and save your model periodically by calling saver.save(session,LOG_DIR/model.ckpt,step).
If you’re new to using TensorBoard,and want to find out how to add data and set up your event files,check out the README and perhaps the TensorBoard tutorial.
If you think TensorBoard is configured properly,please see the section of the README devoted to missing data problems and consider filing an issue on GitHub.
为简化起见,我使用以下代码在训练循环中生成嵌入;仍然没用。
for e in epochs:
.
.
writer.add_embedding(torch.randn(100,5),global_step=e)
我在这里想念什么?
解决方法
遇到相同的错误后,我尝试运行用于嵌入的示例脚本,突然间它起作用了。
我将其范围缩小到:在添加嵌入之前或之后将任何图像添加到Tensorboard使其起作用。像这样:
writer.add_image('image',np.ones((3,3,3)),0)
不确定是什么原因造成的。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。