import tensorflow as tf
from tensorflow.python.platform import gfile
model = 'ssd_mobilenet_v1_coco_2017_11_17.pb'
graph = tf.get_default_graph()
graph_def = graph.as_graph_def()
graph_def.ParseFromString(gfile.FastGFile(model, 'rb').read())
tf.import_graph_def(graph_def, name='graph')
summaryWriter = tf.summary.FileWriter('pb_out/', graph)
运行后,会在文件夹pb_out生成文件,接下来在终端执行命令:
tensorboard --logdir pb_out
复制下面的网页连接地址并打开。