Update timm/models/byobnet.py

Co-authored-by: Hyeongchan Kim <kozistr@gmail.com>
pull/1063/head
Michael Monashev 4 years ago committed by GitHub
parent 43d7df3e57
commit 2ed06dd250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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'):

Loading…
Cancel
Save