aimet_onnx.lite_mp¶
Top-level API
- aimet_onnx.lite_mp.flip_layers_to_higher_precision(sim, layer_sensitivity_dict, percent_to_flip=10.0, override_precision=float16)[source]
Given a sim object and a layer-sensitivity dictionary, flip a given percentage of the layers to higher precision.
- Parameters:
sim (
QuantizationSimModel) – QuantizationSimModel instance initialized with the base precisionlayer_sensitivity_dict (
Dict[str,float]) – Dict of (layer_name: sqnr_metric) that is output from analyze_per_layer_sensitivitypercent_to_flip (
float) – Percentage of layers to flipoverride_precision (
qtype|tuple[qtype,qtype]) – Precision to set layers to. Supports single precision for parameters and activations, or tuple of (param_type, activation_type).