提交 f615474b 编写于 作者: R Ross Wightman

Fix broken test, repvgg block doesn't have attn_last attr.

上级 742c2d52
...@@ -573,9 +573,8 @@ class RepVggBlock(nn.Module): ...@@ -573,9 +573,8 @@ class RepVggBlock(nn.Module):
if isinstance(m, nn.BatchNorm2d): if isinstance(m, nn.BatchNorm2d):
nn.init.normal_(m.weight, .1, .1) nn.init.normal_(m.weight, .1, .1)
nn.init.normal_(m.bias, 0, .1) nn.init.normal_(m.bias, 0, .1)
for attn in (self.attn, self.attn_last): if hasattr(self.attn, 'reset_parameters'):
if hasattr(attn, 'reset_parameters'): self.attn.reset_parameters()
attn.reset_parameters()
def forward(self, x): def forward(self, x):
if self.identity is None: if self.identity is None:
......
...@@ -110,4 +110,4 @@ class CecaModule(nn.Module): ...@@ -110,4 +110,4 @@ class CecaModule(nn.Module):
return x * y.expand_as(x) return x * y.expand_as(x)
CircularEfficientChannelAttn = CecaModule CircularEfficientChannelAttn = CecaModule
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册