本文介绍了TensorFlow:打开SummaryWriter写入的日志数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总结和TensorBoard上学习本教程后,我已经能够成功地使用 TensorBoard 保存和查看数据.是否可以使用 TensorBoard 以外的其他工具打开这些数据?

After following this tutorial on summaries and TensorBoard, I've been able to successfully save and look at data with TensorBoard. Is it possible to open this data with something other than TensorBoard?

顺便说一下,我的申请是做off-policy learning.我目前正在使用 SummaryWriter 保存每个 state-action-reward 元组.我知道我可以手动存储/训练这些数据,但我认为使用 TensorFlow 的内置日志记录功能来存储/加载这些数据会很好.

By the way, my application is to do off-policy learning. I'm currently saving each state-action-reward tuple using SummaryWriter. I know I could manually store/train on this data, but I thought it'd be nice to use TensorFlow's built in logging features to store/load this data.

推荐答案

截至 2017 年 3 月,EventAccumulator 工具 已从 Tensorflow 核心移动到 Tensorboard 后端.您仍然可以使用它从 Tensorboard 日志文件中提取数据,如下所示:

As of March 2017, the EventAccumulator tool has been moved from Tensorflow core to the Tensorboard Backend. You can still use it to extract data from Tensorboard log files as follows:

from tensorboard.backend.event_processing.event_accumulator import EventAccumulator
event_acc = EventAccumulator('/path/to/summary/folder')
event_acc.Reload()
# Show all tags in the log file
print(event_acc.Tags())

# E. g. get wall clock, number of steps and value for a scalar 'Accuracy'
w_times, step_nums, vals = zip(*event_acc.Scalars('Accuracy'))

这篇关于TensorFlow:打开SummaryWriter写入的日志数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 21:27