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/