diff options
author | Mustafa Ispir <ispir@google.com> | 2017-01-18 12:49:54 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-18 13:06:56 -0800 |
commit | 62915c0c528c8829502d8fa550c7c248a924c094 (patch) | |
tree | d04e71f059d98491442461938f1380b92e47c8e1 | |
parent | aa22f93fc85467f3d8aa388e8ee6fdd932ee74cb (diff) |
Added duration to the log of LoggingTensorHook. Duration is logged in many internal examples.
Change: 144869279
-rw-r--r-- | tensorflow/python/training/basic_session_run_hooks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/python/training/basic_session_run_hooks.py b/tensorflow/python/training/basic_session_run_hooks.py index 206cfa442f..cda4fedec7 100644 --- a/tensorflow/python/training/basic_session_run_hooks.py +++ b/tensorflow/python/training/basic_session_run_hooks.py @@ -173,14 +173,14 @@ class LoggingTensorHook(session_run_hook.SessionRunHook): if self._should_trigger: original = np.get_printoptions() np.set_printoptions(suppress=True) + elapsed_secs, _ = self._timer.update_last_triggered_step(self._iter_count) if self._formatter: logging.info(self._formatter(run_values.results)) else: stats = [] for tag in self._tag_order: stats.append("%s = %s" % (tag, run_values.results[tag])) - logging.info("%s", ", ".join(stats)) - self._timer.update_last_triggered_step(self._iter_count) + logging.info("%s (%.3f sec)", ", ".join(stats), elapsed_secs) np.set_printoptions(**original) self._iter_count += 1 |