首页 > 解决方案 > 如何解析张量流事件文件?

问题描述

我想知道如何从events模型输出文件中提取相同的性能结果Tensorboard:特别是精度、召回和损失数字是最感兴趣的。以下是Tensorboard给定模型检查点目录中显示的其中一部分:

在此处输入图像描述

我不确定这些模型是否有自记录信息或其他元数据。这个特别是Faster RNN Inception: 但是这些输出是否与特定模型相关联,或者它们在格式上是通用的吗?

标签: tensorflowtensorboard

解决方案


在tensorboard包中找到了方法:

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

其中一项是:

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

Step从该列表中,我们可以提取[number] 和Value(of the loss )等属性:

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

推荐阅读