From 34d97c574b652831c68a1b15e3c1e5518dd4e54e Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Sat, 29 Jan 2022 13:54:04 +0800 Subject: [PATCH] fix FakeQuantAbsMax in QAT (#39307) --- python/paddle/nn/quant/quant_layers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/nn/quant/quant_layers.py b/python/paddle/nn/quant/quant_layers.py index 36f4c222877..7ad43da6ed5 100644 --- a/python/paddle/nn/quant/quant_layers.py +++ b/python/paddle/nn/quant/quant_layers.py @@ -67,7 +67,7 @@ class FakeQuantAbsMax(layers.Layer): if quant_on_weight: scale_attr = ParamAttr( name=self._scale_name, - initializer=Constant(0.0), + initializer=Constant(0.001), trainable=False) self._scale = self.create_parameter( shape=[1], attr=scale_attr, dtype=self._dtype) -- GitLab