允许您读取事件文件(存储摘要的位置)的功能是 tf.train.summary_iterator 。你可以尝试这样的事情:
tf.train.summary_iterator
import tensorflow as tf tfevents_logdir = path_to_existing_event_logdir tfevents_filepath_new = path_to_new_event_file writer = tf.summary.FileWriter(tfevents_logdir) for e in tf.train.summary_iterator(tfevents_filepath_new): if e.step == 0 or e.step % 50 == 0: # or any other criterion but make sure # you keep events from step 0 writer.add_event(e) writer.close()