AssertionError: CUDA unavailable, invalid device 0 requested

1.6.0版本的torch不支持低版本的cuda 10.1 所以检测不到gpu,安装兼容10.1低版本cuda的对应torch版本1.6.0+cu101

 

pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html

posted @ 2020-09-15 15:35  singyoutosleep  阅读(7465)  评论(0编辑  收藏  举报