code: def getFP32(
      input_graph, out_tensor, precision, batch_size, workspace_size
  ):
      graph_prefix = input_graph.split(".pb")[0]
      output_graph = graph_prefix + "_tftrt_" + precision + ".pb"
      # print("output graph is ", output_graph)
      tftrt_graph = trt.create_inference_graph(
          getFrozenGraph(input_graph),
          [out_tensor],
          max_batch_size=batch_size,
          max_workspace_size_bytes=workspace_size,
          precision_mode=precision,
      )  # Get optimized graph
      with gfile.FastGFile(output_graph, "wb") as f:
          f.write(tftrt_graph.SerializeToString())
  
file_path: delta/egs/mock_text_nlu_joint_data/nlu-joint/v1/utils/deploy/convert_frozen_pb_to_tftrt.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import os
  import delta.compat
  import tensorflow.contrib.tensorrt
  from tensorflow.python.platform import gfile
label_desc: Use image node_id 2 for calling a global function with example usage: getFP32(input_graph, out_tensor, precision, batch_size, workspace_size) without return types