pytorch(gpu版本安装)
pytorch(gpu版本安装)
·
Pytorch官网下载很慢
选择以下方法,关于版本对应从pytorch官网查看
官网方法
pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121
其他方法
pip install torch==2.2.0+cu121 torchvision==0.17.0+cu121 torchaudio==2.2.0+cu121 -f https://mirrors.aliyun.com/pytorch-wheels/cu121/
注意:安装torch会自动安装numpy,若安装了的numpy版本是2.x,需要将其下调版本,因为pytorch官网推荐使用1.x版本,我这里安装的是1.24,若使用2.x版本,torch.from_numpy会报错。
更多推荐
所有评论(0)