From d1e84f3e9e46f0776653d014faf318319c56679c Mon Sep 17 00:00:00 2001 From: cc <52520497+juncaipeng@users.noreply.github.com> Date: Mon, 16 Nov 2020 21:18:37 +0800 Subject: [PATCH] Add some ops for cacluating output scale, test=develop (#28644) --- .../fluid/contrib/slim/quantization/quantization_pass.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py b/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py index eba881a2637..68bf9ecd80b 100644 --- a/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py +++ b/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py @@ -69,6 +69,10 @@ _out_scale_op_list = [ "hard_swish", "hard_sigmoid", "conv2d_transpose", + "gru", + "bilinear_interp", + "nearest_interp", + "trilinear_interp", ] # list op real input and output names, to avoid processing input such as AxisTensor. @@ -114,6 +118,7 @@ _op_real_in_out_name = { "scale": [["X"], ["Out"]], "hard_swish": [["X"], ["Out"]], "hard_sigmoid": [["X"], ["Out"]], + "gru": [["Input", "Weight"], ["Hidden"]], } _conv_ops = ['conv2d', 'depthwise_conv2d', 'conv2d_transpose'] -- GitLab