예제 #1
0
 def text(self, *args, **kwargs):
     kwargs.setdefault('step', 1)
     writer = tf_v2.summary.create_file_writer(self.get_temp_dir())
     with writer.as_default():
         summary.text(*args, **kwargs)
     writer.close()
     return self.read_single_event_from_eventfile().summary
예제 #2
0
 def graph_fn():
     # Recreate the active scope inside the defun since it won't propagate.
     with tf.name_scope(scope):
         summary.text(*args, **kwargs)
예제 #3
0
 def write_text_event(self, *args, **kwargs):
     kwargs.setdefault('step', 1)
     writer = tf2.summary.create_file_writer(self.get_temp_dir())
     with writer.as_default():
         summary.text(*args, **kwargs)
     writer.close()