class_docstr: Recreate a different inference graph to accept images encoded as png. 
class_docstr_tok: ["Recreate","a","different","inference","graph","to","accept","images","encoded","as","png","."]
code: def build_graph(self, input_img_bytes):
      # prepare input (png encoded strings to images)
      input_img = tf.map_fn(
          lambda x: tf.image.decode_png(x, channels=3),
          input_img_bytes,
          dtype=tf.uint8,
      )
  
      # just copy the relevant parts to this graph.
      prediction_img = self.make_prediction(input_img)
  
      # outputs should be png encoded strings agains
      prediction_img = tf.clip_by_value(prediction_img, 0, 255)
      prediction_img = tf.cast(prediction_img, tf.uint8)
      prediction_img_bytes = tf.map_fn(
          tf.image.encode_png, prediction_img, dtype=tf.string
      )
  
      tf.identity(prediction_img_bytes, name="prediction_img_bytes")
  
imports: import argparse
  import cv2
  from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.tfutils.export import ModelExporter
label_desc: Use image node_id 2 for calling the InferenceOnlyModel obj's underlying member method code with example usage: obj.build_graph(input_img_bytes) without return types