# if True, 'quantize_op_types' will be TENSORRT_OP_TYPES
'for_tensorrt':False,
# if True, 'quantoze_op_types' will be TRANSFORM_PASS_OP_TYPES + QUANT_DEQUANT_PASS_OP_TYPES
'is_full_quantize':False
'is_full_quantize':False,
# if True, use onnx format to quant.
'onnx_format':False,
}
...
...
@@ -222,7 +224,6 @@ def quant_aware(program,
act_preprocess_func=None,
optimizer_func=None,
executor=None,
onnx_format=False,
return_program=False,
draw_graph=False):
"""Add quantization and dequantization operators to "program"
...
...
@@ -236,7 +237,9 @@ def quant_aware(program,
Default: None.
scope(paddle.static.Scope): Scope records the mapping between variable names and variables,
similar to brackets in programming languages. Usually users can use
`paddle.static.global_scope <https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api_cn/executor_cn/global_scope_cn.html>`_. When ``None`` will use `paddle.static.global_scope() <https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api_cn/executor_cn/global_scope_cn.html>`_ . Default: ``None``.
When ``None`` will use `paddle.static.global_scope() <https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api_cn/executor_cn/global_scope_cn.html>`_ .
Default: ``None``.
for_test(bool): If the 'program' parameter is a test program, this parameter should be set to ``True``.
Otherwise, set to ``False``.Default: False
weight_quantize_func(function): Function that defines how to quantize weight. Using this