code: def inference(
      cls, architecture, files, path, test_input_path, is_frozen=False
  ):
      if is_frozen:
          architecture_ = architecture + "_frozen"
      else:
          architecture_ = architecture
  
      if cls.download(architecture_, path):
          import numpy as np
  
          if "rnn" not in architecture_:
              func = TestKit.preprocess_func["tensorflow"][architecture]
              img = func(test_input_path)
              img = np.expand_dims(img, axis=0)
              input_data = img
          else:
              input_data = np.load(test_input_path)
  
          if is_frozen:
              tf_model_path = cls.architecture_map[architecture_][
                  "filename"
              ]
              with open(path + tf_model_path, "rb") as f:
                  serialized = f.read()
              tf.reset_default_graph()
              original_gdef = tf.GraphDef()
              original_gdef.ParseFromString(serialized)
              tf_output_name = cls.architecture_map[architecture_][
                  "tensor_out"
              ]
              tf_input_name = cls.architecture_map[architecture_][
                  "tensor_in"
              ]
              feed_dict = cls.architecture_map[architecture_][
                  "feed_dict"
              ]
  
              with tf.Graph().as_default() as g:
                  tf.import_graph_def(original_gdef, name="")
              with tf.Session(graph=g) as sess:
                  tf_out = sess.run(
                      tf_output_name[0], feed_dict=feed_dict(input_data)
                  )  # temporarily think the num of out nodes is one
              predict = np.squeeze(tf_out)
              return predict
  
          else:
              with slim.arg_scope(
                  cls.architecture_map[architecture]["arg_scope"]()
              ):
                  data_input = cls.architecture_map[architecture][
                      "input"
                  ]()
                  logits, endpoints = cls.architecture_map[
                      architecture
                  ]["builder"]()(
                      data_input,
                      num_classes=cls.architecture_map[architecture][
                          "num_classes"
                      ],
                      is_training=False,
                  )
                  labels = tf.squeeze(logits)
  
              init = tf.global_variables_initializer()
              with tf.Session() as sess:
                  sess.run(init)
                  saver = tf.train.Saver()
                  saver.restore(
                      sess,
                      path
                      + cls.architecture_map[architecture]["filename"],
                  )
                  predict = sess.run(
                      logits, feed_dict={data_input: input_data}
                  )
  
              import tensorflow.contrib.keras as keras
  
              keras.backend.clear_session()
  
              predict = np.squeeze(predict)
              return predict
  
      else:
          return None
  
imports: from __future__ import absolute_import
  import os
  import tensorflow
  from tensorflow.contrib.slim.nets import vgg
  from tensorflow.contrib.slim.nets import inception
  from tensorflow.contrib.slim.nets import resnet_v1
  from tensorflow.contrib.slim.nets import resnet_v2
  from mmdnn.conversion.examples.tensorflow.models import inception_resnet_v2
  from mmdnn.conversion.examples.tensorflow.models import mobilenet_v1
  from mmdnn.conversion.examples.tensorflow.models import nasnet
  from mmdnn.conversion.examples.tensorflow.models.mobilenet import mobilenet_v2
  from mmdnn.conversion.examples.tensorflow.models import inception_resnet_v1
  from mmdnn.conversion.examples.tensorflow.models import test_rnn
  from mmdnn.conversion.examples.imagenet_test import TestKit
  from mmdnn.conversion.examples.extractor import base_extractor
  from mmdnn.conversion.common.utils import download_file
label_desc: Use image node_id 5 for calling the tensorflow_extractor obj's underlying member method code with example usage: obj.inference(cls, architecture, files, path, test_input_path, is_frozen) and returns: None, predict, predict