class_docstr: Interface for weight compression algorithm that acts on a per-layer basis.
  
  This allows both options of either decompressing during inference or
  decompressing prior to inference (where compression occurs by applying a
  tool such as zip to the model file).
  
  This interface is a purely functional one.
class_docstr_tok: ["Interface","for","weight","compression","algorithm","that","acts","on","a","per-layer","basis",".","This","allows","both","options","of","either","decompressing","during","inference","or","decompressing","prior","to","inference","(","where","compression","occurs","by","applying","a","tool","such","as","zip","to","the","model","file",")",".","This","interface","is","a","purely","functional","one","."]
docstr: Add a training weight for the compressible weight.
  
  When this method is called from the `init_training_weights`, this adds
  training weights for the pretrained_weight that is the input of the
  `init_training_weights`.
  
  Args:
    *args: Passed through to training_model.add_weight.
    **kwargs: Passed through to training_model.add_weight.
docstr_tok: ["Add","a","training","weight","for","the","compressible","weight",".","When","this","method","is","called","from","the","`","init_training_weights","`",",","this","adds","training","weights","for","the","pretrained_weight","that","is","the","input","of","the","`","init_training_weights","`",".","Args",":","*","args",":","Passed","through","to","training_model.add_weight",".","*","*","kwargs",":","Passed","through","to","training_model.add_weight","."]
code: def add_training_weight(self, *args, **kwargs):
      """Add a training weight for the compressible weight.
  
      When this method is called from the `init_training_weights`, this adds
      training weights for the pretrained_weight that is the input of the
      `init_training_weights`.
  
      Args:
        *args: Passed through to training_model.add_weight.
        **kwargs: Passed through to training_model.add_weight.
      """
      weight_repr = WeightRepr(args=args, kwargs=kwargs)
      if hasattr(self, "weight_reprs"):
          self.weight_reprs.append(weight_repr)
      else:
          self.weight_reprs = [weight_repr]
  
file_path: model-optimization/tensorflow_model_optimization/python/core/common/keras/compression/algorithm.py
imports: import abc
  from typing import List, Any
  import dataclasses
  import tensorflow
  from tensorflow_model_optimization.python.core.common.keras.compression.internal import optimize
label_desc: Use image node_id 3 for calling the WeightCompressor obj's underlying member method code with example usage: obj.add_training_weight() without return types