Skip to content

amp import error #1875

Answered by KumoLiu
shengzhang90 asked this question in General
Nov 7, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

GradScaler moved under torch.amp after torch 2.3.0. Could you please try upgrade your PyTorch version or you can simply use torch.cuda.amp.GradScaler?
https://github.com/pytorch/pytorch/tree/v2.3.0/torch/amp

Thanks.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@shengzhang90
Comment options

@KumoLiu
Comment options

Answer selected by shengzhang90
@shengzhang90
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants