class_docstr: Quantizes the weights and activations of the keras layer it wraps.
class_docstr_tok: ["Quantizes","the","weights","and","activations","of","the","keras","layer","it","wraps","."]
docstr: Create a quantize emulate wrapper for a keras layer.
  
  Args:
    layer: The keras layer to be quantized.
    quantize_config: `QuantizeConfig` to quantize layer.
    name_prefix: Prefix for quantized keras layer name. The default is
      `quant_`.
    **kwargs: Additional keyword arguments to be passed to the keras layer.
docstr_tok: ["Create","a","quantize","emulate","wrapper","for","a","keras","layer",".","Args",":","layer",":","The","keras","layer","to","be","quantized",".","quantize_config",":","`","QuantizeConfig","`","to","quantize","layer",".","name_prefix",":","Prefix","for","quantized","keras","layer","name",".","The","default","is","`","quant_","`",".","*","*","kwargs",":","Additional","keyword","arguments","to","be","passed","to","the","keras","layer","."]
code: def __init__(
      self, layer, quantize_config, name_prefix="quant_", **kwargs
  ):
      """Create a quantize emulate wrapper for a keras layer.
  
      Args:
        layer: The keras layer to be quantized.
        quantize_config: `QuantizeConfig` to quantize layer.
        name_prefix: Prefix for quantized keras layer name. The default is
          `quant_`.
        **kwargs: Additional keyword arguments to be passed to the keras layer.
      """
      if layer is None:
          raise ValueError("`layer` cannot be None.")
  
      if name_prefix is None:
          name_prefix = ""
  
      # Check against keras.Model since it is an instance of keras.layers.Layer.
      if not isinstance(layer, tf.keras.layers.Layer) or isinstance(
          layer, tf.keras.Model
      ):
          raise ValueError(
              "`layer` can only be a `tf.keras.layers.Layer` instance. "
              "You passed an instance of type: {input}.".format(
                  input=layer.__class__.__name__
              )
          )
  
      if quantize_config is None:
          raise ValueError(
              "quantize_config cannot be None. It is needed to "
              "quantize a layer."
          )
  
      if "name" not in kwargs:
          kwargs["name"] = self._make_layer_name(layer, name_prefix)
  
      super(QuantizeWrapper, self).__init__(layer, **kwargs)
      self.quantize_config = quantize_config
  
      self._track_trackable(layer, name="layer")
      metrics.MonitorBoolGauge("quantize_wrapper_usage").set(
          layer.__class__.__name__
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow.python.util import tf_inspect
  from tensorflow_model_optimization.python.core.keras import metrics
  from tensorflow_model_optimization.python.core.keras import utils
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_aware_activation
  from tensorflow_model_optimization.python.core.quantization.keras import utils
label_desc: Use image node_id 1 to create a new QuantizeWrapper object from inherited base classes: tf.keras.layers with example: obj = QuantizeWrapper(layer, quantize_config, name_prefix)