class_docstr: Base quantizer for pytorch quantizer
code: def __init__(self, model, config_list, optimizer=None):
      super().__init__(model, config_list, optimizer)
      self.quant_grad = QuantGrad
      if self.optimizer is not None:
          self.patch_optimizer(self.step_with_optimizer)
          for wrapper in self.get_modules_wrapper():
              if "weight" in wrapper.config["quant_types"]:
                  # old_weight is registered to keep track of weight before quantization
                  # and it is trainable, therefore, it should be added to optimizer.
                  self.optimizer.add_param_group(
                      {"params": wrapper.module.old_weight}
                  )
  
imports: import types
  import logging
  import torch
  from .None import default_layers
label_desc: Use image node_id 1 to create a new Quantizer object from inherited base classes: Compressor with example: obj = Quantizer(model, config_list, optimizer)