docstr: predictor config setting
docstr_tok: ["predictor","config","setting"]
code: def _set_config(self):
      """
      predictor config setting
      """
      self.model_file_path = self.default_pretrained_model_path
      model = self.default_pretrained_model_path + ".pdmodel"
      params = self.default_pretrained_model_path + ".pdiparams"
      cpu_config = Config(model, params)
      cpu_config.disable_glog_info()
      cpu_config.switch_ir_optim(True)
      cpu_config.enable_memory_optim()
      cpu_config.switch_use_feed_fetch_ops(False)
      cpu_config.switch_specify_input_names(True)
      cpu_config.disable_glog_info()
      cpu_config.disable_gpu()
      self.cpu_predictor = create_predictor(cpu_config)
  
      try:
          _places = os.environ["CUDA_VISIBLE_DEVICES"]
          int(_places[0])
          use_gpu = True
      except:
          use_gpu = False
      if use_gpu:
          gpu_config = Config(model, params)
          gpu_config.disable_glog_info()
          gpu_config.switch_ir_optim(True)
          gpu_config.enable_memory_optim()
          gpu_config.switch_use_feed_fetch_ops(False)
          gpu_config.switch_specify_input_names(True)
          gpu_config.disable_glog_info()
          gpu_config.enable_use_gpu(100, 0)
          self.gpu_predictor = create_predictor(gpu_config)
  
file_path: PaddleHub/modules/image/semantic_segmentation/Extract_Line_Draft/module.py
imports: import argparse
  import ast
  import os
  import cv2
  from pathlib import Path
  from paddle.inference import Config, create_predictor
  from paddlehub.module.module import runnable, moduleinfo
  import numpy
  from .function import get_light_map_single, normalize_pic, resize_img_512_3d, show_active_img_and_save_denoise
label_desc: Use image node_id 2 for calling the ExtractLineDraft obj's underlying member method code with example usage: obj._set_config() without return types