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

Method _init_writer

tensorflow/python/keras/callbacks_v1.py:165–175  ·  view source on GitHub ↗

Sets file writer.

(self, model)

Source from the content-addressed store, hash-verified

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."""

Callers 1

set_modelMethod · 0.95

Calls 3

executing_eagerlyMethod · 0.80
as_defaultMethod · 0.45
graphMethod · 0.45

Tested by

no test coverage detected