出现错误:C:\Users\Administrator\anaconda3\lib\site-packages\torch\autocast_mode.py:162: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling')

解决办法为:进入设备管理器->显示适配器->发现NVIDIA图标处有一个黄色的三角形->禁用->扫描更改->启用->再重新运行代码,就可以正常运行了。

更多推荐

yolov5运行出现UserWarning: User provided device_type of ‘cuda‘, but CUDA is not avai