tensorflow - 如何解析张量流事件文件?
问题描述
我想知道如何从events
模型输出文件中提取相同的性能结果Tensorboard
:特别是精度、召回和损失数字是最感兴趣的。以下是Tensorboard
给定模型检查点目录中显示的其中一部分:
我不确定这些模型是否有自记录信息或其他元数据。这个特别是Faster RNN Inception
: 但是这些输出是否与特定模型相关联,或者它们在格式上是通用的吗?
解决方案
在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])
推荐阅读
- node.js - 使用 Object.keys 渲染变量,多个 Object.keys 循环 reactjs
- python - 在 for 循环中直接调用 SeqIO.parse() 有效,但事先单独使用它不是吗?为什么?
- arrays - 在 Armv8 Assembly 中访问和修改数组
- scala - 如何访问类参数?
- c++ - fopen() 支持大文件和 UNICODE 文件名
- python - 如何在不安装“extras_require”依赖项的情况下运行“python setup.py test”?
- r - 如何逐行同时读取和写入文件?
- azure - 如何添加另一个经典管理员?
- r - 尝试将闪亮的应用程序部署到 shinyapps.io 时出错(以代码 137 退出)
- javascript - Javascript 异步函数从 API 获取正确的数据,但只返回“未定义”