提交 06217c04 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2949 fix SequentialCell

Merge pull request !2949 from jiangjinsheng/issue_fix4
......@@ -69,7 +69,7 @@ class SequentialCell(Cell):
Alternatively, an ordered dict of cells can also be passed in.
Args:
args (list, optional): List of subclass of Cell.
args (list, OrderedDict): List of subclass of Cell.
Raises:
TypeError: If arg is not of type list or OrderedDict.
......
......@@ -588,7 +588,7 @@ class GroupNorm(Cell):
"""calculate groupnorm output"""
batch, channel, height, width = self.shape(x)
_channel_check(channel, self.num_channels)
x = self.reshape(x, (batch, self.num_groups, channel*height*width/self.num_groups))
x = self.reshape(x, (batch, self.num_groups, -1))
mean = self.reduce_mean(x, 2)
var = self.reduce_sum(self.square(x - mean), 2) / (channel * height * width / self.num_groups - 1)
std = self.sqrt(var + self.eps)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册