From 266283b21d76e1a5d4e36a44447befc103972ccb Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Mon, 31 Oct 2022 17:40:02 +0800 Subject: [PATCH] remove postprocess in dygraph ptq export (#47487) --- .../paddle/fluid/contrib/slim/quantization/imperative/ptq.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python/paddle/fluid/contrib/slim/quantization/imperative/ptq.py b/python/paddle/fluid/contrib/slim/quantization/imperative/ptq.py index 67b7c1073e..febdacdf43 100644 --- a/python/paddle/fluid/contrib/slim/quantization/imperative/ptq.py +++ b/python/paddle/fluid/contrib/slim/quantization/imperative/ptq.py @@ -140,15 +140,11 @@ class ImperativePTQ(object): assert isinstance( model, paddle.nn.Layer ), "The model must be the instance of paddle.nn.Layer." - is_postprocess = config.get('postprocess', True) - config.pop('postprocess', None) # Convert and save dygraph quantized model self._convert(model) paddle.jit.save(layer=model, path=path, input_spec=input_spec, **config) - if not is_postprocess: - return # Load inference program is_dynamic_mode = False -- GitLab