在官网使用
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
命令安装 结果是CPU版本的 试了几次都是这样 尚不清楚原因
使用 pip安装就可以了:
pip3 install torch1.8.1+cu111 torchvision0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html