Skip to content

Commit fc3410b

Browse files
committed
fix grad_checkpoint feature for torch2.5
1 parent 2d734d9 commit fc3410b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

timm/models/eva.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ def forward_features(self, x):
677677
x, rot_pos_embed = self._pos_embed(x)
678678
for blk in self.blocks:
679679
if self.grad_checkpointing and not torch.jit.is_scripting():
680-
x = checkpoint(blk, x, rope=rot_pos_embed)
680+
x = checkpoint(blk, x, rope=rot_pos_embed, use_reentrant=False)
681681
else:
682682
x = blk(x, rope=rot_pos_embed)
683683
x = self.norm(x)

0 commit comments

Comments
 (0)