class_docstr: Abstract base PyTorch compressor
docstr: Record necessary info in class members
  
  Parameters
  ----------
  model : pytorch model
      the model user wants to compress
  config_list : list
      the configurations that users specify for compression
  optimizer: pytorch optimizer
      optimizer used to train the model
docstr_tok: ["Record","necessary","info","in","class","members","Parameters","--","--","--","--","--","model",":","pytorch","model","the","model","user","wants","to","compress","config_list",":","list","the","configurations","that","users","specify","for","compression","optimizer",":","pytorch","optimizer","optimizer","used","to","train","the","model"]
code: def __init__(self, model, config_list, optimizer=None):
      """
      Record necessary info in class members
  
      Parameters
      ----------
      model : pytorch model
          the model user wants to compress
      config_list : list
          the configurations that users specify for compression
      optimizer: pytorch optimizer
          optimizer used to train the model
      """
      assert isinstance(model, torch.nn.Module)
      self.validate_config(model, config_list)
  
      self.bound_model = model
      self.config_list = config_list
      self.optimizer = optimizer
  
      self.modules_to_compress = None
      self.modules_wrapper = []
      self.is_wrapped = False
  
      self._fwd_hook_handles = {}
      self._fwd_hook_id = 0
  
      self.reset()
  
      if not self.modules_wrapper:
          _logger.warning(
              "Nothing is configured to compress, please check your model and config_list"
          )
  
imports: import types
  import logging
  import torch
  from .None import default_layers
label_desc: Use image node_id 1 to create a new Compressor object  with example: obj = Compressor(model, config_list, optimizer)