Sets the default writer for custom batch-level summaries.
(self, writer_name)
| 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.""" |
| 1589 | if self.update_freq == 'epoch': |
| 1590 | # Writer is only used for custom summaries, which are written |
| 1591 | # batch-by-batch. |
| 1592 | return |
| 1593 | writer = self._get_writer(writer_name) |
| 1594 | step = self._total_batches_seen[writer_name] |
| 1595 | context.context().summary_writer = writer |
| 1596 | |
| 1597 | def _should_record(): |
| 1598 | return math_ops.equal(step % self.update_freq, 0) |
| 1599 | |
| 1600 | context.context().summary_recording = _should_record |
| 1601 | summary_ops_v2.set_step(step) |
| 1602 | |
| 1603 | def _init_batch_steps(self): |
| 1604 | """Create the total batch counters.""" |
no test coverage detected