# coding=utf-8 import tensorflow as tf import os from tensorflow.python.framework.graph_util import convert_variables_to_constants from tensorflow.python.framework import graph_util
# output_node_names = "whichPun/output:0"
with tf.Session() as sess: saver = tf.train.import_meta_graph('model/-1.meta') saver.restore(sess, tf.train.latest_checkpoint("model/")) graph = sess.graph