【问题标题】:How to visualize the graph in tensorboard using ckpt files?如何使用 ckpt 文件在 tensorboard 中可视化图形?
【发布时间】:2017-11-09 00:32:48
【问题描述】:

我有这样的 ckpt 文件,这就是我所拥有的:

我想知道如何使用这些文件在 tensorboard 中创建图表。 如果我有 pb 文件,我不需要运行图表,我只需要导入图表。我所要做的就是使用代码:

import os
import tensorflow as tf

inception_graph_def_file = os.path.join('./', 'tensorflow_inception_graph.pb')
with tf.Session() as sess:
    with tf.gfile.FastGFile(inception_graph_def_file, 'rb') as f:
        graph_def = tf.GraphDef()
        graph_def.ParseFromString(f.read())
        tf.import_graph_def(graph_def, name='')
    writer = tf.summary.FileWriter('./', sess.graph)
    writer.close()

那么,有没有办法像 pb 文件一样使用 ckpt 文件?

【问题讨论】:

    标签: tensorflow tensorboard


    【解决方案1】:

    不,我不这么认为,否则他们会在存储库中给出。据我所知 .ckpt.meta 文件只包含权重,只有权重我们不能在 tensorboard 中绘制图形,它需要一些由 graph_pb2.GraphDef() 函数提供的结构。

    我想你应该看看这个 import_pb_tensorbord

    您可以通过提供基本参数来运行它。

    【讨论】:

      猜你喜欢
      • 2018-04-13
      • 2021-02-24
      • 2020-01-22
      • 1970-01-01
      • 2016-03-28
      • 2023-01-17
      • 2023-02-03
      • 2016-02-19
      • 1970-01-01
      相关资源
      最近更新 更多