From bd80903333e13a939271f048bbfe3079ae7ba776 Mon Sep 17 00:00:00 2001 From: cc <52520497+juncaipeng@users.noreply.github.com> Date: Thu, 26 Mar 2020 11:12:30 +0800 Subject: [PATCH] Add activation_type in AddQuantDequantPass to be compatible with paddleslim, test=develop (#23221) --- .../fluid/contrib/slim/quantization/quantization_pass.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py b/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py index 213033f883c..201ffc35dd3 100644 --- a/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py +++ b/python/paddle/fluid/contrib/slim/quantization/quantization_pass.py @@ -1247,6 +1247,9 @@ class AddQuantDequantPass(object): "leaky_relu", "tanh", "swish" ] + # To be compatible with PaddleSlim, not remove _activation_type for now + _activation_type = ["relu", "relu6", "leaky_relu", "tanh", "swish"] + def __init__(self, scope=None, place=None, -- GitLab