Tensorflow:高级api估计器中的Tensorboard

时间:2018-07-27 11:02:36

标签: tensorflow tensorboard tensorflow-estimator

我在stackoverflow中看到一些帖子,其中高级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.

有人可以在这里帮助我吗?

1 个答案:

答案 0 :(得分:0)

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

我位于我的model_dir的第二个父目录中,因此在我输入$tensorboard ...的当前工作目录中没有此类model_dir。 令人惊讶的是,它不会在命令行中引起任何错误,这使我认为在这一步中我没有犯任何错误。

据我所知,“ tfevent”文件不在您命名目录的子目录中。但是,您有责任确保cwd中确实存在目录model_dir。