PyTorch学习记录(一):安装及自测
版本查看
# 查看PyTorch的版本
import torch
print(torch.__version__)
# 查看torchvision版本
import torchvision
print(torchvision.__verison__)
# 不进入python环境
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
参考资料
-
官网下载PyTorch
https://pytorch.org/get-started/locally/ -
验证PyTorch是否安装成功
https://pytorch.org/get-started/locally/#windows-verification -
Previous Version 先前版本
https://pytorch.org/get-started/previous-versions -
在RTX3090上安装PyTorch
https://medium.com/@dun.chwong/the-simple-guide-deep-learning-with-rtx-3090-cuda-cudnn-tensorflow-keras-pytorch-e88a2a8249bc -
Windows系统安装PyTorch
https://blog.csdn.net/weixin_47065678/article/details/126742732 -
PyTorch与torchvision版本对应
https://github.com/pytorch/vision#installation -
PyTorch与PyTorch-Lightning版本对应
https://github.com/Lightning-AI/lightning/discussions/13131