Created
May 3, 2019 13:48
-
-
Save iwatake2222/841084e4aa09bd5d205ea14669a83059 to your computer and use it in GitHub Desktop.
TensorFlowモデル(pb)の構造を見る
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
with tf.Session() as sess: | |
with tf.gfile.GFile('conv_mnist.pb', 'rb') as f: | |
graph_def = tf.GraphDef() | |
graph_def.ParseFromString(f.read()) | |
g_in = tf.import_graph_def(graph_def) | |
train_writer = tf.summary.FileWriter('logs') | |
train_writer.add_graph(sess.graph) | |
''' | |
python create_graph_for_tensorboard.py | |
tensorboard --logdir=logs | |
''' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment