AIMET ONNX Cross Layer Equalization APIs


AIMET functionality for Cross Layer Equalization has 3 features-
  • BatchNorm Folding

  • Cross Layer Scaling

  • High Bias Fold

Cross Layer Equalization API

The following API performs BatchNorm fold followed by Cross Layer Scaling followed by High Bias Fold.

Note: High Bias fold will not happen when the below API is used, if the model does not have BatchNorm layers

API for Cross Layer Equalization


High-level API to perform Cross-Layer Equalization (CLE) on the given model. The model is equalized in place.


model (ModelProto) – Model to equalize

Code Example

Required imports

from aimet_onnx.cross_layer_equalization import equalize_model

Cross Layer Equalization in auto mode

def cross_layer_equalization():
    onnx_model = Model()