MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _log_trace

Method _log_trace

tensorflow/python/keras/callbacks.py:1694–1705  ·  view source on GitHub ↗

Logs the trace graph to TensorBoard.

(self)

Source from the content-addressed store, hash-verified

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.

Callers 2

on_train_batch_endMethod · 0.95
on_train_endMethod · 0.95

Calls 5

_get_writerMethod · 0.95
executing_eagerlyMethod · 0.80
as_defaultMethod · 0.45
get_valueMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected