class_docstr: Emulate quantization of tensors passed through the layer.
docstr: Create a QuantizeLayer.
  
  Args:
    quantizer: `Quantizer` used to quantize tensors. quantizer=None
      means no quantization of the input layer.
    **kwargs: Additional keyword arguments to be passed to the keras layer.
docstr_tok: ["Create","a","QuantizeLayer",".","Args",":","quantizer",":","`","Quantizer","`","used","to","quantize","tensors",".","quantizer=None","means","no","quantization","of","the","input","layer",".","*","*","kwargs",":","Additional","keyword","arguments","to","be","passed","to","the","keras","layer","."]
code: def __init__(self, quantizer, **kwargs):
      """Create a QuantizeLayer.
  
      Args:
        quantizer: `Quantizer` used to quantize tensors. quantizer=None
          means no quantization of the input layer.
        **kwargs: Additional keyword arguments to be passed to the keras layer.
      """
      super(QuantizeLayer, self).__init__(**kwargs)
  
      if quantizer is not None and not isinstance(
          quantizer, quantizers.Quantizer
      ):
          raise ValueError(
              "quantizer should be an instance"
              "of `tfmot.quantization.keras.quantizers.Quantizer`."
          )
  
      self.quantizer = quantizer
  
file_path: model-optimization/tensorflow_model_optimization/python/core/quantization/keras/quantize_layer.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow_model_optimization.python.core.keras import utils
  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 1 to create a new QuantizeLayer object from inherited base classes: tf.keras.layers with example: obj = QuantizeLayer(quantizer)