code: def main():
      """
      You can also run these commands manually to generate the pb file
      1. git clone https://github.com/tensorflow/models.git
      2. export PYTHONPATH=Path_to_your_model_folder
      3. python alexnet.py
      """
      height, width = 32, 32
      inputs = tf.Variable(
          tf.random_uniform((1, height, width, 3)), name="input"
      )
      inputs = tf.identity(inputs, "input_node")
      net, end_points = lenet.lenet(inputs)
      print("nodes in the graph")
      for n in end_points:
          print(n + " => " + str(end_points[n]))
      net_outputs = map(
          lambda x: tf.get_default_graph().get_tensor_by_name(x),
          argv[2].split(","),
      )
      run_model(net_outputs, argv[1], "LeNet", argv[3] == "True")
  
imports: import tensorflow
  from nets import lenet
  from sys import argv
  from util import run_model
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types