code: def convert(name, size, op):
      json_dic = {}
      json_dic["convert_from"] = name + "_frozen.pb"
      json_dic["convert_to"] = name + "_" + op + "_converted.tflite"
      json_dic["input_nodes"] = "input"
      json_dic["output_nodes"] = "MobilenetV1/Predictions/Reshape_1:0"
      command = ""
      if op == "float":
          command = json.dumps([json_dic])
      if op == "float16":
          quant_dic = {}
          quant_dic["type"] = "float16"
          quant_dic["opsset"] = "tf"
          json_dic["quantization"] = quant_dic
          command = json.dumps([json_dic])
      if op == "int8":
          quant_dic = {}
          quant_dic["type"] = "int8"
          quant_dic["opsset"] = "int8"
          quant_dic["load"] = (
              REP_DATA
              + " --custom_data '1,"
              + size
              + ","
              + size
              + ","
              + "3,1000' --undefok custom_data"
          )
          json_dic["quantization"] = quant_dic
          command = json.dumps([json_dic])
      if op == "uint8":
          quant_dic = {}
          quant_dic["type"] = "uint8"
          quant_dic["opsset"] = "tf"
          quant_dic["load"] = (
              REP_DATA
              + " --custom_data '1,"
              + size
              + ","
              + size
              + ","
              + "3,1000' --undefok custom_data"
          )
          json_dic["quantization"] = quant_dic
          command = json.dumps([json_dic])
      try:
          process = subprocess.Popen(
              "python3 -m aup.dlconvert -d " + "'" + str(command) + "'",
              shell=True,
          ).wait()
      except:
          print("Could not Convert= " + str(command))
          return 0
      return 1
  
file_path: auptimizer/Examples/converter_examples/Convert_Benchmark/script_mobilenet.py
imports: import keras
  import subprocess
  from os import path
  import pandas
  import json
label_desc: Use image node_id 5 for calling a global function with example usage: convert(name, size, op) and returns: int, int