class_docstr: Parameters
  ----------
  model : pytorch model
      The model to speedup by quantization.
  input_shape : tuple
      The input shape of the model, shall pass it to torch.onnx.export.
      Note, the batch size of input_shape is the inference batch of the created trt engine,
      it should be equal to the batch size of running test with the engine.
  config : dict
      Config recording bits number and name of layers.
  onnx_path : str
      The path user want to store onnx model which is converted from pytorch model.
docstr: This speedup approach leverages calibrator
docstr_tok: ["This","speedup","approach","leverages","calibrator"]
code: def compress_with_calibrator(self, calib):
      """
      This speedup approach leverages calibrator
      """
      # convert model to onnx
      device = torch.device("cpu")
      dummy_input = torch.randn(self.input_shape).to(device)
      self.model.to(device)
      torch.onnx.export(
          self.model,
          dummy_input,
          self.onnx_path,
          verbose=False,
          input_names=self.input_names,
          output_names=self.output_names,
          export_params=True,
      )
      # build endine
      self.engine = build_engine_with_calib(
          self.onnx_path, calib, self.input_shape
      )
  
imports: import time
  import logging
  import tensorrt
  import numpy
  import torch
  from .None import frontend_to_onnx
  from .None import trt_pycuda
  from .backend import BaseModelSpeedup
label_desc: Use image node_id 3 for calling the ModelSpeedupTensorRT obj's underlying member method code with example usage: obj.compress_with_calibrator(calib) without return types