Skip to content

Commit 983310d

Browse files
committed
Fix #1935 , torch.amp.autocast -> torch.autocast (namespace issue for 1.10 pt compat)
1 parent 9260cf5 commit 983310d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

timm/models/efficientvit_mit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def forward(self, x):
260260
v = F.pad(v, (0, 1), mode="constant", value=1.)
261261

262262
if not torch.jit.is_scripting():
263-
with torch.amp.autocast(device_type=v.device.type, enabled=False):
263+
with torch.autocast(device_type=v.device.type, enabled=False):
264264
out = self._attn(q, k, v)
265265
else:
266266
out = self._attn(q, k, v)

0 commit comments

Comments
 (0)