1、 导出TensorBoard中的数据
1. 方式一:利用TensorBoard界面控件导出
1、在TensorBoard 页面右边框中有一个Show data download links 选项,勾选后就可以在图表下方看见下载标志,具体步骤如下图所示:

2.方式二:利用代码方式导出
导出TensorBoard中数据的代码如下所示:
from tensorboard.backend.event_processing import event_accumulator
#加载日志数据
ea=event_accumulator.EventAccumulator('events.out.tfevents.1550994567.vvd-Inspiron-7557')
ea.Reload()
print(ea.scalars.Keys())
val_psnr=ea.scalars.Items('val_psnr')
print(len(val_psnr))
print([(i.step,i.value) for i in val_psnr])
导出结果:
['val_loss', 'val_psnr', 'loss', 'psnr', 'lr']
29
[

本文介绍了如何从TensorBoard导出训练数据,包括两种方法:通过界面控件和使用代码。同时,由于默认限制只导出10000条数据,文章提供了解决方案,在启动TensorBoard时设置参数以导出所有数据。此外,还分享了如何在本地对下载的原始数据进行平滑处理的代码实现。
最低0.47元/天 解锁文章
2097

被折叠的 条评论
为什么被折叠?



