TensorFlow - Importing data from a TensorBoard TFEvent file?

前端 未结 7 1731
刺人心
刺人心 2020-12-04 08:50

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

相关标签:
7条回答
  • 2020-12-04 09:45

    To read a TFEvent you can get a Python iterator that yields Event protocol buffers.

    # This example supposes that the events file contains summaries with a
    # summary value tag 'loss'.  These could have been added by calling
    # `add_summary()`, passing the output of a scalar summary op created with
    # with: `tf.scalar_summary(['loss'], loss_tensor)`.
    for e in tf.train.summary_iterator(path_to_events_file):
        for v in e.summary.value:
            if v.tag == 'loss' or v.tag == 'accuracy':
                print(v.simple_value)
    

    more info: summary_iterator

    0 讨论(0)
提交回复
热议问题