gpt4 book ai didi

python - TensorFlow - 从 TensorBoard TFEvent 文件中导入数据?

转载 作者:IT老高 更新时间:2023-10-28 21:46:48 31 4
gpt4 key购买 nike

我已经在 TensorFlow 中使用不同的图表进行了多次培训。我设置的摘要在训练和验证中显示了有趣的结果。现在,我想将我保存在摘要日志中的数据进行一些统计分析,并以不同的方式绘制和查看摘要数据。是否有任何现有方法可以轻松访问这些数据?

更具体地说,是否有任何内置方法可以将 TFEvent 记录读回 Python?

如果没有简单的方法可以做到这一点,TensorFlow states that all its file formats are protobuf files .根据我对 protobufs(这是有限的)的理解,如果我有 TFEvent 协议(protocol)规范,我想我可以提取这些数据。有没有简单的方法来掌握这个?非常感谢。

最佳答案

作为法布里齐奥 says , TensorBoard 是可视化摘要日志内容的绝佳工具。但是,如果要执行自定义分析,可以使用 tf.train.summary_iterator()循环所有tf.Event的函数和 tf.Summary日志中的 Protocol Buffer :

for summary in tf.train.summary_iterator("/path/to/log/file"):
# Perform custom processing in here.

tf2 更新:

from tensorflow.python.summary.summary_iterator import summary_iterator

您需要导入它,默认情况下当前未导入该模块级别。在 2.0.0-rc2 上

关于python - TensorFlow - 从 TensorBoard TFEvent 文件中导入数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37304461/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com