未验证 提交 498b437b 编写于 作者: F Feng Ni 提交者: GitHub

fix reid resnet bn export (#5168)

上级 598dca7f
...@@ -55,12 +55,14 @@ class ConvBNLayer(nn.Layer): ...@@ -55,12 +55,14 @@ class ConvBNLayer(nn.Layer):
bias_attr=False, bias_attr=False,
data_format=data_format) data_format=data_format)
self._batch_norm = nn.BatchNorm( self._batch_norm = nn.BatchNorm2D(num_filters)
num_filters, act=act, data_layout=data_format) self.act = act
def forward(self, inputs): def forward(self, inputs):
y = self._conv(inputs) y = self._conv(inputs)
y = self._batch_norm(y) y = self._batch_norm(y)
if self.act:
y = getattr(F, self.act)(y)
return y return y
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册