mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Fix #1935 , torch.amp.autocast -> torch.autocast (namespace issue for 1.10 pt compat)
This commit is contained in:
parent
9260cf517d
commit
983310d6a2
@ -260,7 +260,7 @@ class LiteMSA(nn.Module):
|
||||
v = F.pad(v, (0, 1), mode="constant", value=1.)
|
||||
|
||||
if not torch.jit.is_scripting():
|
||||
with torch.amp.autocast(device_type=v.device.type, enabled=False):
|
||||
with torch.autocast(device_type=v.device.type, enabled=False):
|
||||
out = self._attn(q, k, v)
|
||||
else:
|
||||
out = self._attn(q, k, v)
|
||||
|
Loading…
x
Reference in New Issue
Block a user