Ubuntu16.04+Pytorch1.4.0+cuda10.0的pip安装:
pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
Pytorch1.6.0安装:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch==1.6.0 torchvision==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
Pytorch1.7.0安装:
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch
添加模块搜索路径:
import sys
sys.path.append(‘路径’)