Search code examples
tensorflowtensorboardtensorflow-estimator

Tensorflow: Tensorboard in high-level api estimator


I see some posts in stackoverflow that the high-level api estimator record summary for you. However, I failed to see any visualization in their way.

In my code, I define custom estimator like this

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)

Then I see my checkpoint and some training miscellany in this model_dir.

And, I enter $tensorboard --logdir=tmp/ in command line and see nothing.

What i see in the localhost:6006/ is

No dashboards are active for the current data set.

Anyone can help me out here?


Solution

  • If anyone has the same question: Here is my finding.

    I am in the 2nd parent directory of the my model_dir so there is no such model_dir in the current working directory where I enter $tensorboard .... Surprisingly It doesn't incur any error in the command line, which makes me think I did not mistake anything in this step.

    And as far as I remember, it doesn't matter your 'tfevent' file is in the subdirectory of the directory you name. But it's your responsibility to ensure that there does exist the directory, model_dir in your cwd.