code: def convert(input_ops, output_ops, byte_order, bigdl_type):
      """
      Convert tensorflow model to bigdl model
      :param input_ops: operation list used for input, should be placeholders
      :param output_ops: operations list used for output
      :return: bigdl model
      """
  
      input_names = map(lambda x: x.name.split(":")[0], input_ops)
      output_names = map(lambda x: x.name.split(":")[0], output_ops)
      temp = tempfile.mkdtemp()
  
      dump_model(path=temp)
      model_path = temp + "/model.pb"
      bin_path = temp + "/model.bin"
  
      model = Model.load_tensorflow(
          model_path,
          input_names,
          output_names,
          byte_order,
          bin_path,
          bigdl_type,
      )
  
      try:
          shutil.rmtree(temp)
      except OSError as e:
          if e.errno != errno.ENOENT:
              invalidOperationError(False, str(e), cause=e)
  
      return model
  
file_path: BigDL/python/dllib/src/bigdl/dllib/utils/tf_utils.py
imports: import tempfile
  import tensorflow
  import shutil
  from google.protobuf import text_format
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import graph_util
  from tensorflow.python.framework import importer
  from tensorflow.python.platform import gfile
  from bigdl.dllib.nn.layer import Model
  from bigdl.dllib.utils.common import JTensor
  from bigdl.dllib.utils.common import callBigDlFunc
  from bigdl.dllib.utils.log4Error import *
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: convert(input_ops, output_ops, byte_order, bigdl_type) and returns: model