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 _instrument_model(self, model):
      for key, value in list(
          model.__dict__.items()
      ):  # avoid "dictionary keys changed during iteration"
          if isinstance(value, tf.keras.layers.Layer):
              new_layer = self._instrument(value)
              if new_layer is not value:
                  setattr(model, key, new_layer)
          elif isinstance(value, list):
              for i, item in enumerate(value):
                  if isinstance(item, tf.keras.layers.Layer):
                      value[i] = self._instrument(item)
      return model
  
file_path: auptimizer/src/aup/compression/tensorflow/compressor.py
imports: import logging
  from .None import default_layers
label_desc: Use image node_id 6 for calling the Compressor obj's underlying member method code with example usage: obj._instrument_model(model) and returns: model