【发布时间】: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 文件?
【问题讨论】: