From af3e27ece4cb49e8c8f9f62b6ada025aad947405 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Fri, 9 Sep 2022 15:13:19 +0800 Subject: [PATCH] support scale op quantization (#45911) --- python/paddle/fluid/contrib/slim/quantization/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/contrib/slim/quantization/utils.py b/python/paddle/fluid/contrib/slim/quantization/utils.py index c2c24348f5..4d92f9f6bf 100644 --- a/python/paddle/fluid/contrib/slim/quantization/utils.py +++ b/python/paddle/fluid/contrib/slim/quantization/utils.py @@ -109,6 +109,7 @@ _act_supported_quantizable_op_type = [ "softplus", "shuffle_channel", "reduce_max", + "scale", ] _out_scale_op_list = list( @@ -191,7 +192,7 @@ _op_real_in_out_name = { "fill_any_like": [["X"], ["Out"]], "fill_constant": [[], ["Out"]], "gelu": [["X"], ["Out"]], - "instance_norm": [["X"], ["Out"]], + "instance_norm": [["X"], ["Y"]], "lookup_table": [["W", "Ids"], ["Out"]], "lookup_table_v2": [["W", "Ids"], ["Out"]], "norm": [["X"], ["Norm"]], @@ -214,6 +215,7 @@ _op_real_in_out_name = { "softplus": [["X"], ["Out"]], "shuffle_channel": [["X"], ["Out"]], "reduce_max": [["X"], ["Out"]], + "scale": [["X"], ["Out"]], } -- GitLab