<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/model-optimization/blob/v0.8.1/tensorflow_model_optimization/python/core/quantization/keras/quantize_registry.py#L24-L51) |

ABC interface which specifies how layers should be quantized.

The Registry is designed to function as a repository of `QuantizeConfig`s
linked to layers. The idea is that while applying quantization to the various
layers within a Keras model, the registry can be used to query which
`QuantizeConfig` can be used to quantize a specific `layer`. The
`QuantizeConfig` itself contains information to quantize that specific
layer.

We provide a default registry for built-in Keras layers, but implementing this
interface allows users the ability to write their own custom registries
specific to their needs. It can also be extended to be used for any Keras
layer, such as custom Keras layers.

## Methods

### `get_quantize_config`

[View source](https://github.com/tensorflow/model-optimization/blob/v0.8.1/tensorflow_model_optimization/python/core/quantization/keras/quantize_registry.py#L41-L51)

    @abc.abstractmethod
    get_quantize_config(
        layer
    )

Returns the quantization config for the given layer.

<br />

<br />

<br />

| Args ||
|---|---|
| `layer` | input layer to return quantize config for. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| Returns the QuantizeConfig for the given layer. ||

<br />