Skip to content

Commit 2a63d02

Browse files
committed
Post merge cleanup
1 parent 45dec17 commit 2a63d02

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

timm/models/convit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.
6464
self.dim = dim
6565
head_dim = dim // num_heads
6666
self.scale = qk_scale or head_dim ** -0.5
67+
self.locality_strength = locality_strength
6768

6869
self.qk = nn.Linear(dim, dim * 2, bias=qkv_bias)
6970
self.v = nn.Linear(dim, dim, bias=qkv_bias)
@@ -72,7 +73,6 @@ def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.
7273
self.proj = nn.Linear(dim, dim)
7374
self.pos_proj = nn.Linear(3, num_heads)
7475
self.proj_drop = nn.Dropout(proj_drop)
75-
self.locality_strength = locality_strength
7676
self.gating_param = nn.Parameter(torch.ones(self.num_heads))
7777
self.rel_indices: torch.Tensor = torch.zeros(1, 1, 1, 3) # silly torchscript hack, won't work with None
7878

timm/models/rexnet.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ def forward(self, x):
9292
if self.use_shortcut:
9393
if self.drop_path is not None:
9494
x = self.drop_path(x)
95-
96-
x[:, 0:self.in_channels] += shortcut
95+
x[:, 0:self.in_channels] += shortcut
9796
return x
9897

9998

0 commit comments

Comments
 (0)