class_docstr: Common base class for all compressors.
  
  This class is designed for other base classes.
  Algorithms should inherit ``Pruner`` or ``Quantizer`` instead.
  
  Attributes
  ----------
  compressed_model : tf.keras.Model
      Compressed user model.
  wrappers : list of tf.keras.Model
      A wrapper is an instrumented TF ``Layer``, in ``Model`` format.
  
  Parameters
  ----------
  model : tf.keras.Model
      The user model to be compressed.
  config_list : list of JSON object
      User configuration. The format is detailed in tutorial.
  LayerWrapperClass : a class derive from Model
      The class used to instrument layers.
class_docstr_tok: ["Common","base","class","for","all","compressors",".","This","class","is","designed","for","other","base","classes",".","Algorithms","should","inherit","``","Pruner","``","or","``","Quantizer","``","instead",".","Attributes","--","--","--","--","--","compressed_model",":","tf.keras.Model","Compressed","user","model",".","wrappers",":","list","of","tf.keras.Model","A","wrapper","is","an","instrumented","TF","``","Layer","``",",","in","``","Model","``","format",".","Parameters","--","--","--","--","--","model",":","tf.keras.Model","The","user","model","to","be","compressed",".","config_list",":","list","of","JSON","object","User","configuration",".","The","format","is","detailed","in","tutorial",".","LayerWrapperClass",":","a","class","derive","from","Model","The","class","used","to","instrument","layers","."]
code: def __init__(self, model, config_list, LayerWrapperClass):
      assert isinstance(model, tf.keras.Model)
      self.validate_config(model, config_list)
  
      self._original_model = model
      self._config_list = config_list
      self._wrapper_class = LayerWrapperClass
      self._wrappers = {}  # key: id(layer) , value: Wrapper(layer)
  
      self.compressed_model = self._instrument(model)
      self.wrappers = list(self._wrappers.values())
  
      if not self.wrappers:
          _logger.warning(
              "Nothing is configured to compress, please check your model and config list"
          )
  
file_path: auptimizer/src/aup/compression/tensorflow/compressor.py
imports: import logging
  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, LayerWrapperClass)