Open Ashionnal opened 4 years ago
大佬你好,我写好了,不知道这样写是否正确
output_graph_def = tf.graph_util.convert_variables_to_constants(sess,
sess.graph.as_graph_def(),
output_node_names=[var.name[:-2] for var in tf.global_variables()])
with tf.gfile.GFile('/home/yanshuxuan/gitprojects/PSENet-Tensorflow/model.pb', "wb") as f:
f.write(output_graph_def.SerializeToString())
print("%d ops in the final graph." % len(output_graph_def.node))
你好, output_node_names = '' output_graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph.as_graph_def(), output_node_names.split(","))
固化模型的时候需要这个参数,请问这个输出节点是什么呢