From 2ed06dd250cfd08c99a1669e0ff590a2acb7103d Mon Sep 17 00:00:00 2001 From: Michael Monashev Date: Fri, 31 Dec 2021 16:18:42 +0300 Subject: [PATCH] Update timm/models/byobnet.py Co-authored-by: Hyeongchan Kim --- timm/models/byobnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/models/byobnet.py b/timm/models/byobnet.py index b1ebf0a0..7a1d77ec 100644 --- a/timm/models/byobnet.py +++ b/timm/models/byobnet.py @@ -1002,7 +1002,7 @@ class BottleneckBlock(nn.Module): self.act = nn.Identity() if linear_out else layers.act(inplace=True) def init_weights(self, zero_init_last: bool = False): - if zero_init_last and self.shortcut is not None and self.conv3_1x1.bn.weigh is not None: + if zero_init_last and self.shortcut is not None and self.conv3_1x1.bn.weight is not None: nn.init.zeros_(self.conv3_1x1.bn.weight) for attn in (self.attn, self.attn_last): if hasattr(attn, 'reset_parameters'):