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 duri
ng 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 resoluti
ons.'torchvision::nms'is only available for these backends:[CPU, Meta, QuantizedCPU, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negat
ive, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradMPS, AutogradXPU, AutogradHPU, AutogradLazy, AutogradMeta, Tracer, AutocastCPU, Aut
ocastCUDA, FuncTorchBatched, BatchedNestedTensor, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PreDispatch, Python
Dispatcher].
解决办法: a. 首先卸载CPU版本的torchvision pip3 uninstall torchvision b. 官网下载torch版本对应的torchvision版本,并安装pip3 install F:\GOLGLE\torchvision-0.18.1+cu121-cp311-cp311-win_amd64.whl