yolov5训练模型报错FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
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):

浙公网安备 33010602011771号