Sets file writer.
(self, model)
| 163 | self._chief_worker_only = True |
| 164 | |
| 165 | def _init_writer(self, model): |
| 166 | """Sets file writer.""" |
| 167 | if context.executing_eagerly(): |
| 168 | self.writer = summary_ops_v2.create_file_writer(self.log_dir) |
| 169 | if not model.run_eagerly and self.write_graph: |
| 170 | with self.writer.as_default(): |
| 171 | summary_ops_v2.graph(K.get_graph(), step=0) |
| 172 | elif self.write_graph: |
| 173 | self.writer = tf_summary.FileWriter(self.log_dir, K.get_graph()) |
| 174 | else: |
| 175 | self.writer = tf_summary.FileWriter(self.log_dir) |
| 176 | |
| 177 | def _make_histogram_ops(self, model): |
| 178 | """Defines histogram ops when histogram_freq > 0.""" |
no test coverage detected