How can I select which checkpoint to view in TensorBoard's embeddings tab?

大兔子大兔子 提交于 2019-12-01 00:10:16
dsmilkov

I'm one of the engineers working on the embedding visualizer. Thanks for the feedback. We are planning to add a dropdown menu in the UI that allows you to choose different checkpoints.

In the meantime, there is a workaround. You can edit the projector_config.pbtxt that lives in the folder where TensorBoard saves the log. I'm assuming the contents of projector_config.pbtxt are:

embeddings {
...
}

Append the following line at the end of the file:

model_checkpoint_path: "path_to_log_dir/model_0000N.ckpt"

pointing to the exact checkpoint you want to visualize, and remove (if it exists) the line model_checkpoint_dir: "...". Then refresh the page (and potentially re-run TensorBoard).


For example, if you have launched TensorBoard with tensorboard --logdir=output, and the model checkpoint absolute path is C:\Users\a\output\en_2017-03-08_17-42-09-310106\model\model_00004.ckpt, then you should append to projector_config.pbtxt:

model_checkpoint_path: "output\en_2017-03-08_17-42-09-310106\model\model_00004.ckpt"

Example of projector_config.pbtxt:

embeddings {
  tensor_name: "token_embedding/W:0"
}
model_checkpoint_path: "output\en_2017-03-08_17-42-09-310106\model\model_00004.ckpt"

If when you click to the embeddings tab in TensorBoard nothing appears, it means that the model_checkpoint_path you have entered is incorrect.

Hope this helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!