mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Fix broken test, repvgg block doesn't have attn_last attr.
This commit is contained in:
parent
742c2d5247
commit
f615474be3
@ -573,9 +573,8 @@ class RepVggBlock(nn.Module):
|
||||
if isinstance(m, nn.BatchNorm2d):
|
||||
nn.init.normal_(m.weight, .1, .1)
|
||||
nn.init.normal_(m.bias, 0, .1)
|
||||
for attn in (self.attn, self.attn_last):
|
||||
if hasattr(attn, 'reset_parameters'):
|
||||
attn.reset_parameters()
|
||||
if hasattr(self.attn, 'reset_parameters'):
|
||||
self.attn.reset_parameters()
|
||||
|
||||
def forward(self, x):
|
||||
if self.identity is None:
|
||||
|
@ -110,4 +110,4 @@ class CecaModule(nn.Module):
|
||||
return x * y.expand_as(x)
|
||||
|
||||
|
||||
CircularEfficientChannelAttn = CecaModule
|
||||
CircularEfficientChannelAttn = CecaModule
|
||||
|
Loading…
x
Reference in New Issue
Block a user