!4384 modiy quant DenseBnAct api

Merge pull request !4384 from chengxb7532/master
This commit is contained in:
mindspore-ci-bot 2020-08-13 19:37:27 +08:00 committed by Gitee
commit 8c377fd159
1 changed files with 3 additions and 1 deletions

View File

@ -205,7 +205,8 @@ class DenseBnAct(Cell):
bias_init='zeros',
has_bias=True,
has_bn=False,
activation=None):
activation=None,
after_fake=True):
super(DenseBnAct, self).__init__()
self.dense = basic.Dense(
in_channels,
@ -215,6 +216,7 @@ class DenseBnAct(Cell):
has_bias)
self.has_bn = validator.check_bool("has_bn", has_bn)
self.has_act = activation is not None
self.after_fake = after_fake
if has_bn:
self.batchnorm = BatchNorm1d(out_channels)
self.activation = get_activation(activation)