code: def convert_model_to_onnx(
      frozen_graph_path, end_node_names, onnx_output_path
  ):
      """Reimplementation of the TensorFlow-onnx official tutorial convert the proto buff to onnx file:
  
      Parameters
      -----------
      frozen_graph_path : string
          the path where your frozen graph file save.
      end_node_names : string
          the name of the end node in your graph you want to get in your proto buff
      onnx_output_path : string
          the path where you want to save the onnx file.
  
      References
      -----------
      - `onnx-tf exporting tutorial <https://github.com/onnx/tutorials/blob/master/tutorials/OnnxTensorflowExport.ipynb>`
      """
      with tf.gfile.GFile(frozen_graph_path, "rb") as f:
          graph_def = tf.GraphDef()
          graph_def.ParseFromString(f.read())
          onnx_model = tensorflow_graph_to_onnx_model(
              graph_def, end_node_names, opset=6
          )
          file = open(onnx_output_path, "wb")
          file.write(onnx_model.SerializeToString())
          file.close()
  
file_path: TensorLayer/examples/tutorial_work_with_onnx.py
imports: import time
  import numpy
  import tensorflow
  from tensorflow.python.tools.freeze_graph import freeze_graph
  import onnx
  import tensorlayer
  from onnx_tf.backend import prepare
  from onnx_tf.frontend import tensorflow_graph_to_onnx_model
label_desc: Use image node_id 3 for calling a global function with example usage: convert_model_to_onnx(frozen_graph_path, end_node_names, onnx_output_path) without return types