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
def graph_fn(): # Recreate the active scope inside the defun since it won't propagate. with tf.name_scope(scope): summary.text(*args, **kwargs)
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()