pytorch Torchvision離線下載 更新

Torchvision has no attribute
Torchvision 需要更新

torchvision 跟torch要匹配
1.1對應0.3

否則 ImportError: cannot import name ‘Optional’

torchvision

https://download.pytorch.org/whl/cu90/torch_stable.html

pytorch
Download the whl file with the desired version from the following html pages:

https://download.pytorch.org/whl/cpu/torch_stable.html # CPU-only build
https://download.pytorch.org/whl/cu80/torch_stable.html # CUDA 8.0 build
https://download.pytorch.org/whl/cu90/torch_stable.html # CUDA 9.0 build
https://download.pytorch.org/whl/cu92/torch_stable.html # CUDA 9.2 build
https://download.pytorch.org/whl/cu100/torch_stable.html # CUDA 10.0 build

whl 安裝
首先卸載之前的torch 和torchvision
pip uninstall torch

然後
pip install +名字

ref
https://pytorch.org/get-started/previous-versions/

https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章