hlzz/DeepMatchVO

pb

kingskymoon opened this issue · 0 comments

Hello,I want to freeze the graph, switch ckpt to pb files. But I failed because of the wrong name of the "output_node_names".

the code is like this:

`def freeze(input_checkpoint, output_graph):
output_node_names = "pose_exp_net/pose/mul:0"
saver = tf.train.import_meta_graph(input_checkpoint + '.meta', clear_devices=True)
with tf.Session() as sess:
saver.restore(sess, input_checkpoint) #
output_graph_def = graph_util.convert_variables_to_constants(
sess=sess,
input_graph_def=sess.graph_def,
output_node_names=output_node_names.split(","))

    with tf.gfile.GFile(output_graph, "wb") as f:  
        f.write(output_graph_def.SerializeToString())  
    print("%d ops in the final graph." % len(output_graph_def.node))  

I dont know how to tackle it , maybe I dont understand the whole project totally. I will be very appreciated if you can answer my questions above.