<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_layout_transform.py#L35-L58) |

Apply transformations to the model.

Transforms the original model to perform better while quantized
and also match the layout of the target backend.

## Methods

### `apply`

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

    @abc.abstractmethod
    apply(
        model, layer_quantize_map
    )

Transform model to a quantization friendly model.

<br />

<br />

<br />

| Args ||
|---|---|
| `model` | Keras model to be quantized. |
| `layer_quantize_map` | Map containing list of layers to be quantized and associated metadata. Keys are layer names which need to be quantized, and values are dicts containing relevant metadata. For example, any custom `QuantizeConfig` passed with a layer is present. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| New keras model based on `model` which has been transformed to match the layout of the target backend. ||

<br />