ruijiege

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instea

修改yolov5的train.py

with torch.cuda.amp.autocast(amp):

替换为

with torch.amp.autocast(device_type='cuda', enabled=amp):

 

posted on 2025-05-26 10:40  哦哟这个怎么搞  阅读(635)  评论(0)    收藏  举报