From 7619fb2bbcb48c1354214115712f0f7b9ccd8096 Mon Sep 17 00:00:00 2001 From: wanghaoshuang Date: Mon, 25 Dec 2023 17:19:44 +0800 Subject: [PATCH] Fix name generator --- paddleslim/quant/reconstruction_quantization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddleslim/quant/reconstruction_quantization.py b/paddleslim/quant/reconstruction_quantization.py index caa9a19db..be9177a93 100644 --- a/paddleslim/quant/reconstruction_quantization.py +++ b/paddleslim/quant/reconstruction_quantization.py @@ -362,7 +362,6 @@ def _preprocess(self): merge_feed=True, ) self._graph = GraphWrapper(self._student_program) - if self._simulate_activation_quant: self._insert_drop_quant_dequant() self._insert_soft_rounding() @@ -556,6 +555,7 @@ def _insert_func(self, var, scale, func): inputs = var._var startup_program = paddle.static.Program() new_program = paddle.static.Program() + new_program._name_generator = program._name_generator with paddle.static.program_guard(new_program, startup_program): if func == "_soft_rounding": out = self._soft_rounding(inputs, scale)