Skip to content

Commit

Permalink
Fix tracing by removing float cast, should end up float anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
rwightman committed Jun 22, 2024
1 parent fb58a73 commit c715c72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timm/models/davit.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def forward(self, x):
q, k, v = qkv.unbind(0)

if self.dynamic_scale:
q = q * float(N) ** -0.5
q = q * N ** -0.5
else:
q = q * self.head_dim ** -0.5
attn = q.transpose(-1, -2) @ k
Expand Down

0 comments on commit c715c72

Please sign in to comment.