AddQuantDequantPass

class paddle.fluid.contrib.slim.quantization.quantization_pass. AddQuantDequantPass ( scope=None, place=None, moving_rate=0.9, quant_bits=8, skip_pattern=['skip_quant'], quantizable_op_type=['elementwise_add', 'pool2d'], is_full_quantized=False ) [source]

Quantize the ops that do not have weights, and add quant_dequant op for the quantized ops’s inputs.

apply ( graph )

apply

Add quant_dequant before some ops, such as the ‘elementwise_add’ and ‘pool2d’ op.

Parameters

graph (IrGraph) – the target graph.

Returns

None