ABC interface which specifies how layers should be quantized.

The Registry is designed to function as a repository of QuantizeConfigs 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.



View source

Returns the quantization config for the given layer.

layer input layer to return quantize config for.

Returns the QuantizeConfig for the given layer.