From 490e86be27eb6b59c9db58d346f9baaae95941fe Mon Sep 17 00:00:00 2001 From: xiaoyisd Date: Wed, 18 Nov 2020 14:39:04 +0800 Subject: [PATCH] fix momentum bug --- mindspore/nn/layer/quant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/nn/layer/quant.py b/mindspore/nn/layer/quant.py index 0449e81429..0bf99ded46 100644 --- a/mindspore/nn/layer/quant.py +++ b/mindspore/nn/layer/quant.py @@ -842,7 +842,7 @@ class Conv2dBnWithoutFoldQuant(Cell): channel_axis=channel_axis, num_channels=out_channels, quant_dtype=quant_dtype) - self.batchnorm = BatchNorm2d(out_channels, eps=eps, momentum=1-momentum) + self.batchnorm = BatchNorm2d(out_channels, eps=eps, momentum=momentum) def construct(self, x): weight = self.fake_quant_weight(self.weight)