class paddle.fluid.contrib.slim.quantization.quant2_int8_mkldnn_pass. Quant2Int8MkldnnPass ( _ops_to_quantize, _op_ids_to_skip=None, _scope=None, _place=None, _core=None, _debug=False ) [source]

Transform a quant model IrGraph into MKL-DNN supported INT8 IrGraph. The pass consists of the following transformations:

System Message: ERROR/3 (/usr/local/lib/python3.8/site-packages/paddle/fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py:docstring of paddle.fluid.contrib.slim.quantization.quant2_int8_mkldnn_pass.Quant2Int8MkldnnPass, line 3)

Unexpected indentation.

  1. gather scale values from fake quantize/dequantize operators,

  2. extract FP32 inference model graph from the quant graph, i.e.
    1. remove fake quantize/dequantize operators,

    2. dequantize conv2d and mul’s weights,

  3. optimize the FP32 graph using standard FP32 optimization fuses

    (e.g. conv2d`+`bn -> conv2d),

  4. quantize the optimized FP32 graph using standard INT8v2 quantization

    passes (cpu_quantize_pass, cpu_quantize_squash_pass).