class_docstr: ABC interface for Keras layers to express how they should be quantized.
  
  This is an experimental API not subject to backward compatibility.
  
  QuantizeConfig encapsulates all the information needed by the quantization
  code to quantize a layer. It specifies what parts of a layer should be
  quantized and how they should be quantized.
  
  It can be used to precisely control the quantization behavior of a layer.
  The framework provides default behavior for each layer, but this can be used
  to override it.
  
  Create QuantizeConfig for a Dense layer:
  
  ```python
  class MyDenseQuantizeConfig(QuantizeConfig):
  
    def get_weights_and_quantizers(self, layer):
      return [(layer.kernel, LastValueQuantizer())]
  
    def get_activations_and_quantizers(self, layer):
      return [(layer.activation, MovingAverageQuantizer())]
  
    def set_quantize_weights(self, layer, quantize_weights):
      layer.kernel = quantize_weights[0]
  
    def set_quantize_activations(self, layer, quantize_activations):
      layer.activation = quantize_activations[0]
  
    def get_output_quantizers(self, layer):
      # Does not quantize output, since we return an empty list.
      return []
  
    def get_config(self):
      return {}
  ```
  
  For a full example, see
  https://www.tensorflow.org/model_optimization/guide/quantization/training_comprehensive_guide.md
class_docstr_tok: ["ABC","interface","for","Keras","layers","to","express","how","they","should","be","quantized",".","This","is","an","experimental","API","not","subject","to","backward","compatibility",".","QuantizeConfig","encapsulates","all","the","information","needed","by","the","quantization","code","to","quantize","a","layer",".","It","specifies","what","parts","of","a","layer","should","be","quantized","and","how","they","should","be","quantized",".","It","can","be","used","to","precisely","control","the","quantization","behavior","of","a","layer",".","The","framework","provides","default","behavior","for","each","layer",",","but","this","can","be","used","to","override","it",".","Create","QuantizeConfig","for","a","Dense","layer",":","``","`","python","class","MyDenseQuantizeConfig","(","QuantizeConfig",")",":","def","get_weights_and_quantizers","(","self",",","layer",")",":","return","[","(","layer.kernel",",","LastValueQuantizer","(",")",")","]","def","get_activations_and_quantizers","(","self",",","layer",")",":","return","[","(","layer.activation",",","MovingAverageQuantizer","(",")",")","]","def","set_quantize_weights","(","self",",","layer",",","quantize_weights",")",":","layer.kernel","=","quantize_weights","[","0","]","def","set_quantize_activations","(","self",",","layer",",","quantize_activations",")",":","layer.activation","=","quantize_activations","[","0","]","def","get_output_quantizers","(","self",",","layer",")",":","#","Does","not","quantize","output",",","since","we","return","an","empty","list",".","return","[","]","def","get_config","(","self",")",":","return","{","}","``","`","For","a","full","example",",","see","https",":","\/\/www.tensorflow.org\/model_optimization\/guide\/quantization\/training_comprehensive_guide.md"]
docstr: Return activations to be quantized along with their quantizers.
  
  This function tells the quantize code which activations within a layer
  should be quantized, and how. The activations are the activation
  attributes in a layer, and the quantizers are `Quantizer` instances.
  
  This method is invoked by the quantization code when quantizing a layer.
  
  Example for a `Dense` layer:
  ```python
  def get_activations_and_quantizers(self, layer):
    return [(layer.activation, MovingAverageQuantizer())]
  ```
  
  Args:
    layer: layer being quantized.
  
  Returns:
    List of 2-tuples. Each tuple is a keras activation and an associated
    quantizer.
docstr_tok: ["Return","activations","to","be","quantized","along","with","their","quantizers",".","This","function","tells","the","quantize","code","which","activations","within","a","layer","should","be","quantized",",","and","how",".","The","activations","are","the","activation","attributes","in","a","layer",",","and","the","quantizers","are","`","Quantizer","`","instances",".","This","method","is","invoked","by","the","quantization","code","when","quantizing","a","layer",".","Example","for","a","`","Dense","`","layer",":","``","`","python","def","get_activations_and_quantizers","(","self",",","layer",")",":","return","[","(","layer.activation",",","MovingAverageQuantizer","(",")",")","]","``","`","Args",":","layer",":","layer","being","quantized",".","Returns",":","List","of","2-tuples",".","Each","tuple","is","a","keras","activation","and","an","associated","quantizer","."]
code: def get_activations_and_quantizers(self, layer):
      """Return activations to be quantized along with their quantizers.
  
      This function tells the quantize code which activations within a layer
      should be quantized, and how. The activations are the activation
      attributes in a layer, and the quantizers are `Quantizer` instances.
  
      This method is invoked by the quantization code when quantizing a layer.
  
      Example for a `Dense` layer:
      ```python
      def get_activations_and_quantizers(self, layer):
        return [(layer.activation, MovingAverageQuantizer())]
      ```
  
      Args:
        layer: layer being quantized.
  
      Returns:
        List of 2-tuples. Each tuple is a keras activation and an associated
        quantizer.
      """
      raise NotImplementedError("Must be implemented in subclasses.")
  
imports: import abc
  import six
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
  from tensorflow_model_optimization.python.core.quantization.keras import utils
label_desc: Use image node_id 2 for calling the QuantizeConfig obj's underlying member method code with example usage: obj.get_activations_and_quantizers(layer) without return types