Tensorflow scalar Summary to human-readable text

谁说胖子不能爱 提交于 2019-12-31 03:59:16

问题


I want to inspect all values for a scalar in my event file. I don't want the aggregate statistics as returned by

tensorboard --inspect --event_file <summary_file> --tag <scalar_tag>

I want all information sufficient for reconstructing the scalar graph (i.e. the unsummarized ordered (x,y) pairs).

How can I do this either with tensorboard or the TF Python API?


回答1:


You could use a tf.train.summary_iterator, e.g.

my_pairs = []
for e in tf.train.summary_iterator(my_event_file_path):
    for v in e.summary.value:
        if v.tag == my_tag:
            my_pairs.append((e.step, v.simple_value))

You may find that parsing your event file is slower than you would like, depending on how much data you put in there.



来源:https://stackoverflow.com/questions/44809032/tensorflow-scalar-summary-to-human-readable-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!