Browse Source

!4384 modiy quant DenseBnAct api

Merge pull request !4384 from chengxb7532/master
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
8c377fd159
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      mindspore/nn/layer/quant.py

+ 3
- 1
mindspore/nn/layer/quant.py 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)


Loading…
Cancel
Save