pytorch网址:
torchvison网址:
https://pypi.org/project/torchvision/0.2.0/
Via pip
从对应的网站下载whl文件
# CPU-only build
- https://download.pytorch.org/whl/cpu/torch_stable.html
# CUDA 8.0 build
- https://download.pytorch.org/whl/cu80/torch_stable.html
# CUDA 9.0 build
- https://download.pytorch.org/whl/cu90/torch_stable.html
# CUDA 9.2 build
- https://download.pytorch.org/whl/cu92/torch_stable.html
# CUDA 10.0 build
- https://download.pytorch.org/whl/cu100/torch_stable.html
使用如下命令安装
pip install [downloaded file]
pip3 install torch torchvision
验证
import torch
import torchvision
print(torch.cuda.is_available())
torch版本查看
import torch
print(torch.__version__)
torchvision版本查看
import torchvison
torchvision.__version__
torchvision卸载
卸载的时候,会提示版本号
pip3 uninstall torchvision