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

Method _get_writer

tensorflow/python/keras/callbacks.py:1568–1585  ·  view source on GitHub ↗

Get a summary writer for the given subdirectory under the logdir. A writer will be created if it does not yet exist. Arguments: writer_name: The name of the directory for which to create or retrieve a writer. Should be either `self._train_run_name` or `self._validatio

(self, writer_name)

Source from the content-addressed store, hash-verified

1566 self._writers.clear()
1567
1568 def _get_writer(self, writer_name):
1569 """Get a summary writer for the given subdirectory under the logdir.
1570
1571 A writer will be created if it does not yet exist.
1572
1573 Arguments:
1574 writer_name: The name of the directory for which to create or
1575 retrieve a writer. Should be either `self._train_run_name` or
1576 `self._validation_run_name`.
1577
1578 Returns:
1579 A `SummaryWriter` object.
1580 """
1581 if writer_name not in self._writers:
1582 path = os.path.join(self.log_dir, writer_name)
1583 writer = summary_ops_v2.create_file_writer_v2(path)
1584 self._writers[writer_name] = writer
1585 return self._writers[writer_name]
1586
1587 def _set_default_writer(self, writer_name):
1588 """Sets the default writer for custom batch-level summaries."""

Callers 5

set_modelMethod · 0.95
_set_default_writerMethod · 0.95
_log_traceMethod · 0.95
_log_metricsMethod · 0.95
_log_weightsMethod · 0.95

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected