Skip to content

Commit b500cae

Browse files
YassineYousfirwightman
authored andcommitted
fastvit: don't dropout in eval
1 parent 054c763 commit b500cae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

timm/models/fastvit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
514514
if self.fused_attn:
515515
x = torch.nn.functional.scaled_dot_product_attention(
516516
q, k, v,
517-
dropout_p=self.attn_drop.p,
517+
dropout_p=self.attn_drop.p if self.training else 0.0,
518518
)
519519
else:
520520
q = q * self.scale

0 commit comments

Comments
 (0)