Tensorflow:高级 api 估算器中的 Tensorboard

Tensorflow: Tensorboard in high-level api estimator

我在 Whosebug 中看到一些帖子,高级 api 估算器为您记录摘要。但是,我没有看到任何可视化方式。

在我的代码中,我这样定义自定义估算器

run_config = tf.estimator.RunConfig(
            model_dir=FLAGS.model_dir,
            save_checkpoints_secs=20,
            save_summary_steps=100)
estimator = tf.estimator.Estimator(
        model_fn=model_fn,
        config=run_config,
        params=model_params)

然后我在这个 model_dir 中看到了我的检查点和一些训练杂项。

而且,我在命令行中输入 $tensorboard --logdir=tmp/,什么也没看到。

我在 localhost:6006/ 中看到的是

No dashboards are active for the current data set.

有人可以帮我吗?

如果有人有同样的问题:这是我的发现。

我在我的 model_dir 的第二个父目录中,所以在我输入 $tensorboard ... 的当前工作目录中没有这样的 model_dir。 令人惊讶的是它不会在命令行中产生任何错误,这让我觉得我在这一步中没有出错。

据我所知,您的 'tfevent' 文件位于您命名的目录的子目录中并不重要。但是您有责任确保目录 model_dir 在您的 cwd.

中确实存在