class_docstr: QuantizationRegistry for built-in Keras classes for default 8-bit scheme.
class_docstr_tok: ["QuantizationRegistry","for","built-in","Keras","classes","for","default","8-bit","scheme","."]
docstr: Returns the quantization config for the given layer.
  
  Args:
    layer: input layer to return quantize config for.
  
  Returns:
    Returns the QuantizeConfig for the given layer.
docstr_tok: ["Returns","the","quantization","config","for","the","given","layer",".","Args",":","layer",":","input","layer","to","return","quantize","config","for",".","Returns",":","Returns","the","QuantizeConfig","for","the","given","layer","."]
code: def get_quantize_config(self, layer):
      """Returns the quantization config for the given layer.
  
      Args:
        layer: input layer to return quantize config for.
  
      Returns:
        Returns the QuantizeConfig for the given layer.
      """
      if not self.supports(layer):
          raise ValueError(
              "`get_quantize_config()` called on an unsupported layer {}. Check "
              "if layer is supported by calling `supports()`. Alternatively, you "
              "can use `QuantizeConfig` to specify a behavior for your layer.".format(
                  layer.__class__
              )
          )
  
      if self._is_supported_layer(layer.__class__):
          return self._get_quantize_config(layer.__class__)
  
      if self._is_rnn_layer(layer):
          weight_attrs = []
          activation_attrs = []
          for rnn_cell in self._get_rnn_cells(layer):
              quantize_info = self._get_quantize_info(
                  rnn_cell.__class__
              )
              weight_attrs.append(quantize_info.weight_attrs)
              activation_attrs.append(quantize_info.activation_attrs)
  
          # Result quantization for RNN isn't straight-forward like regular layers.
          # To implement during full RNN support.
          return DefaultNBitQuantizeConfigRNN(
              weight_attrs,
              activation_attrs,
              False,
              num_bits_weight=self._num_bits_weight,
              num_bits_activation=self._num_bits_activation,
          )
  
      # Should never come here.
      raise ValueError("Invalid Layer type {}".format(layer.__class__))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Dict
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_config
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_registry
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
  from tensorflow_model_optimization.python.core.quantization.keras.experimental.default_n_bit import default_n_bit_quantize_configs
  from tensorflow_model_optimization.python.core.quantization.keras.experimental.default_n_bit import default_n_bit_quantizers
label_desc: Use image node_id 7 for calling the DefaultNBitQuantizeRegistry obj's underlying member method code with example usage: obj.get_quantize_config(layer) and returns: self, DefaultNBitQuantizeConfigRNN