<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/quantizers/quantization_config.py#L6-L62) |

Base class for quantization configs.

    tf.keras.quantizers.QuantizationConfig(
        weight_quantizer=None, activation_quantizer=None
    )

Subclasses must implement the `mode` property and the `get_config` and
`from_config` class methods.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `weight_quantizer` | Quantizer for weights. |
| `activation_quantizer` | Quantizer for activations. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `mode` | <br /> <br /> |

<br />

## Methods

### `activation_quantizer_or_default`

[View source](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/quantizers/quantization_config.py#L58-L62)

    @staticmethod
    activation_quantizer_or_default(
        config, default
    )

### `from_config`

[View source](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/quantizers/quantization_config.py#L39-L50)

    @classmethod
    from_config(
        config
    )

### `get_config`

[View source](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/quantizers/quantization_config.py#L29-L37)

    get_config()

### `weight_quantizer_or_default`

[View source](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/quantizers/quantization_config.py#L52-L56)

    @staticmethod
    weight_quantizer_or_default(
        config, default
    )