I\'ve run several training sessions with different graphs in TensorFlow. The summaries I set up show interesting results in the training and validation. Now, I\'d like to ta
I've been using this. It assumes that you only want to see tags you've logged more than once whose values are floats and returns the results as a pd.DataFrame. Just call metrics_df = parse_events_file(path).
from collections import defaultdict
import pandas as pd
import tensorflow as tf
def is_interesting_tag(tag):
if 'val' in tag or 'train' in tag:
return True
else:
return False
def parse_events_file(path: str) -> pd.DataFrame:
metrics = defaultdict(list)
for e in tf.train.summary_iterator(path):
for v in e.summary.value:
if isinstance(v.simple_value, float) and is_interesting_tag(v.tag):
metrics[v.tag].append(v.simple_value)
if v.tag == 'loss' or v.tag == 'accuracy':
print(v.simple_value)
metrics_df = pd.DataFrame({k: v for k,v in metrics.items() if len(v) > 1})
return metrics_df