code: def __init__(self, model_path, param_path, use_gpu=False):
      model_path, param_path = self.check_param(model_path, param_path)
      try:
          config = paddle_infer.Config(model_path, param_path)
      except:
          ValueError(" 模型和参数不匹配，请检查模型和参数是否加载错误")
      if not use_gpu:
          config.enable_mkldnn()
          # TODO: fluid要废弃了，研究判断方式
          # if paddle.fluid.core.supports_bfloat16():
          #     config.enable_mkldnn_bfloat16()
          config.switch_ir_optim(True)
          config.set_cpu_math_library_num_threads(10)
      else:
          config.enable_use_gpu(500, 0)
          config.delete_pass("conv_elementwise_add_act_fuse_pass")
          config.delete_pass("conv_elementwise_add2_act_fuse_pass")
          config.delete_pass("conv_elementwise_add_fuse_pass")
          config.switch_ir_optim()
          config.enable_memory_optim()
          # use_tensoret = False  # TODO: 目前Linux和windows下使用TensorRT报错
          # if use_tensoret:
          #     config.enable_tensorrt_engine(
          #         workspace_size=1 << 30,
          #         precision_mode=paddle_infer.PrecisionType.Float32,
          #         max_batch_size=1,
          #         min_subgraph_size=5,
          #         use_static=False,
          #         use_calib_mode=False,
          #     )
      self.model = paddle_infer.create_predictor(config)
  
imports: import os.path
  from abc import abstractmethod
  import paddle.inference
label_desc: Use image node_id 1 to create a new EISegModel object  with example: obj = EISegModel(model_path, param_path, use_gpu)