class_docstr: Represent modifications to inference graph for weight compression.
class_docstr_tok: ["Represent","modifications","to","inference","graph","for","weight","compression","."]
code: def __init__(
      self,
      layer,
      algorithm,
      training_tensors: Mapping[str, List[tf.Tensor]],
  ):
      self.algorithm = algorithm
      # training_tensors is a map from compressible attributes (e.g. 'kernel')
      # to tensors (not variables to prevent model size increasing) with the
      # same shape as the corresponding variables used during training.
      self.training_tensors = training_tensors
  
      self.original_add_weight = layer.add_weight
      setattr(layer, "add_weight", self._skip_compressible_weights)
  
      super(_InferenceWrapper, self).__init__(layer)
  
imports: from typing import List, Mapping
  import tensorflow
label_desc: Use image node_id 1 to create a new _InferenceWrapper object from inherited base classes: tf.keras.layers with example: obj = _InferenceWrapper(layer, algorithm, training_tensors)