예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 def _close(self):
   with ops.control_dependencies([self.flush()]):
     with ops.device("cpu:0"):
       return gen_summary_ops.close_summary_writer(self._resource)
예제 #4
0
 def _close(self):
   with ops.control_dependencies([self.flush()]):
     with ops.device("cpu:0"):
       return gen_summary_ops.close_summary_writer(self._resource)