code: def apply_compact(graph_path):
      """Run the pruned and frozen inference graph."""
      with tf.Session(
          config=tf.ConfigProto(allow_soft_placement=True)
      ) as sess:
          # Note, we just load the graph and do *not* need to initialize anything.
          with tf.gfile.GFile(graph_path, "rb") as f:
              graph_def = tf.GraphDef()
              graph_def.ParseFromString(f.read())
              tf.import_graph_def(graph_def)
  
          input_img = sess.graph.get_tensor_by_name(
              "import/input_img:0"
          )
          prediction_img = sess.graph.get_tensor_by_name(
              "import/prediction_img:0"
          )
  
          prediction = sess.run(
              prediction_img,
              {input_img: cv2.imread("lena.png")[None, ...]},
          )
          cv2.imwrite("applied_compact.png", prediction[0])
  
imports: import argparse
  import cv2
  from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.tfutils.export import ModelExporter
label_desc: Use image node_id 6 for calling a global function with example usage: apply_compact(graph_path) without return types