From 7bc5b71b44b89d1d1080c2138060d4fa492eed2e Mon Sep 17 00:00:00 2001 From: chengxianbin Date: Thu, 13 Aug 2020 23:22:49 +0800 Subject: [PATCH] modify quant DenseBnAct code --- mindspore/train/quant/quant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/train/quant/quant.py b/mindspore/train/quant/quant.py index b67292f046..c57926323e 100644 --- a/mindspore/train/quant/quant.py +++ b/mindspore/train/quant/quant.py @@ -274,7 +274,7 @@ class ConvertToQuantNetwork: subcell.dense = dense_inner if subcell.has_act and subcell.activation is not None: subcell.activation = self._convert_activation(subcell.activation) - elif subcell.after_fake: + else: subcell.has_act = True subcell.activation = _AddFakeQuantAfterSubCell(F.identity, num_bits=self.act_bits,