【问题标题】:How to export tensor board data?如何导出张量板数据?
【发布时间】:2017-04-26 06:13:59
【问题描述】:

在 tensorord 的 README.md 中,它要求我这样做:

如何从 TensorBoard 导出数据?

如果您想导出数据以在其他地方进行可视化(例如 iPython Notebook), 这也是可能的。您可以直接依赖于 TensorBoard 用于加载数据:python/summary/event_accumulator.py(用于 从单次运行加载数据)或python/summary/event_multiplexer.py(对于 从多次运行中加载数据,并保持组织)。这些类加载 事件文件组,丢弃因 TensorFlow 崩溃而“孤立”的数据, 并按标签组织数据。

我按照 tensorflow 中的 mnist 示例所说的那样做。 但是我无法从原始数据中获取任何事件,而它通常显示在张量板上。

下面是我的代码:

x = EventAccumulator(path="/tmp/tensorflow/mnist/logs/mnist_with_summaries/")
x.Reload()
print(x.Tags())
x.FirstEventTimestamp()
print(x.Tags())

结果如下:

{'scalars': [], 'histograms': [], 'run_metadata': [], 'images': [], 'graph': False, 'audio': [], 'meta_graph': False, 'compressedHistograms': []}

我无法从原始数据中获取任何标签或事件。但是,当我打开张量板时。一切看起来都很好。

【问题讨论】:

    标签: python tensorboard


    【解决方案1】:

    根据EventAccumulator 的文档,path arg 是包含 tf 事件文件或单个 tf 事件文件的目录的文件路径。 因此,在您的情况下,您应该使用以下方法实例化 EventAccumulator 实例:

    x = EventAccumulator(path="/tmp/tensorflow/mnist/logs/mnist_with_summaries/train")
    

    x = EventAccumulator(path="/tmp/tensorflow/mnist/logs/mnist_with_summaries/test")
    

    【讨论】:

      猜你喜欢
      • 2021-08-18
      • 2016-03-31
      • 2020-01-15
      • 1970-01-01
      • 2019-05-06
      • 2016-07-15
      • 2016-07-25
      • 2021-04-03
      • 2019-10-10
      相关资源
      最近更新 更多