code: def run_test(path, input):
      predictor = OfflinePredictor(
          PredictConfig(
              input_signature=[
                  tf.TensorSpec(
                      (None, 227, 227, 3), tf.float32, "input"
                  )
              ],
              tower_func=tower_func,
              session_init=SmartInit(path),
              input_names=["input"],
              output_names=["prob"],
          )
      )
  
      im = cv2.imread(input)
      assert im is not None, input
      im = (
          cv2.resize(im, (227, 227))[None, :, :, ::-1].astype("float32")
          - 110
      )
      outputs = predictor(im)[0]
      prob = outputs[0]
      ret = prob.argsort()[-10:][::-1]
      print("Top10 predictions:", ret)
  
      meta = ILSVRCMeta().get_synset_words_1000()
      print("Top10 class names:", [meta[k] for k in ret])
  
file_path: tensorpack/examples/CaffeModels/load-alexnet.py
imports: from __future__ import print_function
  import argparse
  import os
  import cv2
  import tensorflow
  from tensorpack import *
  from tensorpack.dataflow.dataset import ILSVRCMeta
  from tensorpack.tfutils.summary import *
label_desc: Use image node_id 2 for calling a global function with example usage: run_test(path, input) without return types