Pytorch常见操作
1、安装Pytorch 推荐打开官网https://pytorch.org/,页面会自动检测本机环境,给出安装命令行 或者手动安装标准版本
pip3 install torch torchvision torchaudio
2、更新Pytorch和torchvision
pip install --upgrade pytorch torchvision
3、卸载Pytorch
pip uninstall torch
4、查看当前pytorch版本
python
>>>import torch
>>>print(torch.__version__)
5、查看pytorch对应的CUDA版本
python
>>>import torch
>>>torch.version.cuda
- 原文作者:boxwang
- 原文链接:https://www.ifshow.com/pytorch-common-operations/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。如果特别注明为转载文章,请联系其原始作者。