saver=tf.train.import_meta_graph(meta_path)
saver.restore(sess,'C:\\Users\\alecd\\3d-pose-baseline\\checks\\checkpoint-4874200.meta')
frozen_graph_def=tf.graph_util.convert_variables_to_constants(sess,sess.graph_def,output_node_names)
with open('output_graph.pb', 'wb') as f:
f.write(frozen_graph_def.SerializeToString())
However, the .pb file I am creating seems to be corrupted and will not let me serve it. Even, though the file size seems to be correct. One possible issue I can think of is the fact that I was not feeding it a specific output node, so I decided to try and import the meta graph and figure out the correct name through tensorboard. However, when I ran:
tf.train.import_meta_graph("checkpoint-4874200.meta")
for n in tf.get_default_graph().as_graph_def().node:
print(n)
with tf.Session() as sess:
writer = tf.summary.FileWriter("./output/", sess.graph)
writer.close()
`
No graph was actually outputted to tensorboard. Does anyone have any ideas as to what is going on with the checkpoint data here?
I am using Windows 10 Tensorflow 1.14
I am trying to create a frozen graph of the 3d-pose-baseline checkpoints using the following script:
` meta_path='3d-pose-baseline\checks\checkpoint-4874200.meta' output_node_names=['output:0']
with tf.Session() as sess:
However, the .pb file I am creating seems to be corrupted and will not let me serve it. Even, though the file size seems to be correct. One possible issue I can think of is the fact that I was not feeding it a specific output node, so I decided to try and import the meta graph and figure out the correct name through tensorboard. However, when I ran:
tf.train.import_meta_graph("checkpoint-4874200.meta") for n in tf.get_default_graph().as_graph_def().node: print(n) with tf.Session() as sess: writer = tf.summary.FileWriter("./output/", sess.graph) writer.close() ` No graph was actually outputted to tensorboard. Does anyone have any ideas as to what is going on with the checkpoint data here?