创建环境 torchname【torch1.1】
conda create -n torch1.1 python=3.7.6
激活环境
conda activate torch1.1
下载PyTorch1.1 CUDA10.0
# CUDA 10.0
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0
之前的版本都在这里
https://pytorch.org/get-started/previous-versions/
jupyter notebook上运行 在condaprompt3
conda install -n pytorch ipykernel
在jupyter notebook中创建pytorch的kernel名称cuda10
python -m ipykernel install --name cuda10
查看torch安装成功没
torch.cuda.device_count()看有多少gpu