Skip to content

Commit 72faca1

Browse files
committed
Update dependencyvit.py
1 parent a441390 commit 72faca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

timm/models/dependencyvit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def forward(self, in_tuple: Tuple[torch.Tensor, torch.Tensor]) -> Tuple[torch.Te
7878
p = (self.head_selector(x) / self.head_selector_temperature).softmax(dim=-1)
7979
p = p.transpose(-2, -1).reshape(B, self.num_heads, 1, N)
8080

81-
m = m * self.message_controller(x).sigmoid().reshape(B, 1, 1, N)
81+
m = self.message_controller(x).sigmoid().reshape(B, 1, 1, N)
8282

8383
q = q * self.scale
8484
attn = q @ k.transpose(-2, -1)
@@ -187,7 +187,7 @@ def forward_features(self, x: torch.Tensor) -> torch.Tensor:
187187
#x = x * m.transpose(1, 3).squeeze(-1) # FIXME before or after norm
188188

189189
x = self.norm(x)
190-
x = x * m.transpose(1, 3).squeeze(-1)
190+
#x = x * m.transpose(1, 3).squeeze(-1)
191191
return x
192192

193193

0 commit comments

Comments
 (0)