code: def __call__(self, model):
      paddleslim = try_import("paddleslim")
      self.quanter = paddleslim.dygraph.quant.QAT(
          config=self.quant_config
      )
      if self.print_model:
          logger.info("Model before quant:")
          logger.info(model)
  
      # For PP-YOLOE, convert model to deploy firstly.
      for layer in model.sublayers():
          if hasattr(layer, "convert_to_deploy"):
              layer.convert_to_deploy()
  
      self.quanter.quantize(model)
  
      if self.print_model:
          logger.info("Quantized model:")
          logger.info(model)
  
      return model
  
file_path: PaddleDetection/ppdet/slim/quant.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from paddle.utils import try_import
  from ppdet.core.workspace import register, serializable
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the QAT obj's underlying member method code with example usage: obj.__call__(model) and returns: model