1. pytorch 和 cuda版本的对应关系
本人使用的是:pytorch1.7.1 python3.8.9 cuda11.0
为什么我要使用pytorch1.7.1呢?因为我要使用 torchtext 0.8.1,都是为了适配它。
2. 在使用GPU的时候,遇到“pytorch capability sm_86 is not compatible with the current PyTorch installation”
本人理解:是因为你安装的pytorch版本不是GPU版本,所以执行以下命令来重新安装一下
pip3 install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/cu110/torch_stable.html
参考博客https://blog.youkuaiyun.com/a563562675/article/details/121656894