Browse Source

!8730 fix the bug that Conv2dBnWithoutFoldQuant param momentum value is changed.

From: @xiaoyisd
Reviewed-by: @sanjaychan,@chenfei52
Signed-off-by: @sanjaychan
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
9649a8f2c2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/nn/layer/quant.py

+ 1
- 1
mindspore/nn/layer/quant.py View File

@@ -845,7 +845,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)


Loading…
Cancel
Save