class_docstr: Represent modifications to inference graph for weight compression.
class_docstr_tok: ["Represent","modifications","to","inference","graph","for","weight","compression","."]
code: def build(
      self, input_shape
  ):  # pytype: disable=signature-mismatch  # overriding-parameter-count-checks
      super(_InferenceWrapper, self).build(input_shape)
  
      # Add weights needed by algorithm during inference.
      self.compressed_weights = {}
      for attr_name in self.training_tensors:
          training_tensors = self.training_tensors[attr_name]
          compressed_tensors = self.algorithm.compress_training_weights(
              *training_tensors
          )
          weights = []
          for t in compressed_tensors:
              weight = self.add_weight(
                  name="TODO",
                  dtype=t.dtype,
                  shape=t.shape,
                  initializer=tf.keras.initializers.Constant(t),
              )
              weights.append(weight)
  
          self.compressed_weights[attr_name] = weights
  
imports: from typing import List, Mapping
  import tensorflow
label_desc: Use image node_id 3 for calling the _InferenceWrapper obj's underlying member method code with example usage: obj.build(input_shape) without return types