完整错误:
NotImplementedError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'torchvision::nms' is only available for these backends: [CPU, QuantizedCPU, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradMPS, AutogradXPU, AutogradHPU, AutogradLazy, Tracer, AutocastCPU, AutocastCUDA, FuncTorchBatched, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PythonDispatcher].
我得到这个当试图训练一个YOLOv8模型在Windows 11机器上,一切工作的第一个纪元,然后发生这种情况。
我也得到这个错误后,立即第一个历元结束,但我不认为这是相关的。
Error executing job with overrides: ['task=detect', 'mode=train', 'model=yolov8n.pt', 'data=custom.yaml', 'epochs=300', 'imgsz=160', 'workers=8', 'batch=4']
我尝试使用CUDA GPU训练YOLOv8图像检测模型。
1条答案
按热度按时间62lalag41#
如果您安装了Torch和Torchaudio for CUDA,但未安装Torchvision for CUDA,则会出现此错误。
卸载 Torch 和 Torch 视觉,我用pip:
然后转到here,使用漂亮的界面安装正确的版本。