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)
| 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.""" |
no test coverage detected