How can I use tensorboard with tf.estimator.Estimator

前端 未结 4 1000
粉色の甜心
粉色の甜心 2020-12-30 06:44

I am considering to move my code base to tf.estimator.Estimator, but I cannot find an example on how to use it in combination with tensorboard summaries.

MWE:

<
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-30 07:41

    You can create a SummarySaverHook with tf.summary.merger_all() as the summary_op in the model_fn itself. Pass this hook to the training_hooks param of the EstimatorSpec constructor in your model_fn.

    I don't think what @jagthebeetle said is exactly applicable here. As the hooks that you transfer to the estimator.train method cannot be run for the summaries that you define in your model_fn, since they won't be added to the merge_all op as they remain bounded by the scope of model_fn

提交回复
热议问题