def close(self): """Flushes and closes the summary writer.""" if self._v2 and context.executing_eagerly() and self._closed: return try: with ops.control_dependencies([self.flush()]): with ops.device("cpu:0"): return gen_summary_ops.close_summary_writer(self._resource) finally: if self._v2 and context.executing_eagerly(): self._closed = True
def close(self): """Flushes and closes the summary writer.""" if self._v2 and context.executing_eagerly() and self._closed: return try: with ops.control_dependencies([self.flush()]): with ops.device("cpu:0"): return gen_summary_ops.close_summary_writer(self._resource) finally: if self._v2 and context.executing_eagerly(): self._closed = True
def _close(self): with ops.control_dependencies([self.flush()]): with ops.device("cpu:0"): return gen_summary_ops.close_summary_writer(self._resource)
def _close(self): with ops.control_dependencies([self.flush()]): with ops.device("cpu:0"): return gen_summary_ops.close_summary_writer(self._resource)