class_docstr: Represent modifications to training graph for weight compression.
class_docstr_tok: ["Represent","modifications","to","training","graph","for","weight","compression","."]
code: def call(self, inputs):
      for attr_name, name in self.attr_name_map.items():
          # TODO(tfmot): move constant folding prevention to the inference graph
          # only, since constant folding won't happen during training.
          training_weight_tensors = []
          tensor_weight_pairs = []
          for v in self.training_weights[name]:
              tensor = _prevent_constant_folding(v.read_value(), inputs)
              training_weight_tensors.append(tensor)
              tensor_weight_pairs.append((tensor, v))
  
          self.algorithm.init_update_ops(tensor_weight_pairs)
          weight_tensor = self.algorithm.project_training_weights(
              *training_weight_tensors
          )
          # TODO(tfmot): Needs to check when this update is happen.
          self.add_update(self.algorithm.get_update_ops())
          setattr(self.layer, attr_name, weight_tensor)
  
      # This assumes that all changes to the forward pass happen "prior" to
      # the nested layer's portion of the forward pass. This suffices since
      # the scope of this API is to only optimize the weights.
      return self.layer.call(inputs)
  
imports: from typing import List, Mapping
  import tensorflow
label_desc: Use image node_id 5 for calling the _TrainingWrapper obj's underlying member method code with example usage: obj.call(inputs) and returns: self