AddQuantDequantPassV2

class paddle.fluid.contrib.slim.quantization.quantization_pass. AddQuantDequantPassV2 ( 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_linear and dequant_linear op for the quantized ops’s inputs. It is used in the new format of quantization.

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