How to parse the tensorflow events file?

谁都会走 提交于 2019-12-11 19:33:55

问题


I would like to know how to extract the same performance results from the events file of the output of a model as does Tensorboard : specifically the Precision, Recall, and Loss numbers are most of interest. Here is a subset of them displayed on Tensorboard given the model checkpoint directory:

I'm not sure if there self-documenting information or other metadata available for these models. This one in particular is the Faster RNN Inception: but are these outputs tied to a particular model or are they generic in format?


回答1:


Found the approach in the tensorboard package:

  from tensorboard.backend.event_processing.event_accumulator import EventAccumulator
  event_acc = EventAccumulator(evtf)
  event_acc.Reload()

One of the entries is:

  scal_losses = event_acc.Scalars('Loss/total_loss')

From that list we can extract such attributes as Step [number] and Value (of the loss):

 losses = sorted([[sevt.step, sevt.value] for sevt in scal_losses])


来源:https://stackoverflow.com/questions/57813373/how-to-parse-the-tensorflow-events-file

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