Logs the trace graph to TensorBoard.
(self)
| 1692 | self._is_tracing = True |
| 1693 | |
| 1694 | def _log_trace(self): |
| 1695 | """Logs the trace graph to TensorBoard.""" |
| 1696 | if context.executing_eagerly(): |
| 1697 | with self._get_writer(self._train_run_name).as_default(), \ |
| 1698 | summary_ops_v2.always_record_summaries(): |
| 1699 | # TODO(b/126388999): Remove step info in the summary name. |
| 1700 | step = K.get_value(self._total_batches_seen[self._train_run_name]) |
| 1701 | summary_ops_v2.trace_export( |
| 1702 | name='batch_%d' % step, |
| 1703 | step=step, |
| 1704 | profiler_outdir=os.path.join(self.log_dir, 'train')) |
| 1705 | self._is_tracing = False |
| 1706 | |
| 1707 | def _log_metrics(self, logs, prefix, step): |
| 1708 | """Writes metrics out as custom scalar summaries. |
no test coverage detected