pytorch 与 pytorch lightning, pytorch geometric 各个版本之间的关系

主要参考 官方的给出的意见;

1. pytorch 与 pytorch lightning 各个版本之间的关系

lightning 主要可以 适配多个版本的 torch;

https://lightning.ai/docs/pytorch/latest/versioning.html#compatibility-matrix;

在这里插入图片描述

2. pytorch 与 pytorch geometric 各个版本之间的关系

https://pytorch-geometric.readthedocs.io/en/2.3.1/notes/installation.html

pytorch geometric 与 torch 版本的对应关系,
则是通过左下角的 来选择当前适配的 torch 版本;

比方说当前是 PyG 2.3.1 , 则界面中显示的是 支持 Pytorch 2.0.* 以及 Pytorch 1.13.* 各个版本。
但是文中也表明最低版本的要求是 pytorch >= 1.8.0

在这里插入图片描述

3. 三者共同使用

官方的教程中,
有个提供了将三者集成到一起使用的

https://lightning.ai/docs/pytorch/stable/notebooks/course_UvA-DL/06-graph-neural-networks.html#Graph-level-tasks:-Graph-classification

! pip install --quiet "matplotlib" "pytorch-lightning >=2.0,<2.4" "torch-sparse ==0.6.*" "torch-spline-conv ==1.2.*" "torch >=1.8.1,<2.5" "torch-cluster ==1.6.*" "torchvision" "numpy <2.0" "seaborn" "torch-scatter ==2.1.*" "torch-geometric ==2.1.*" "torchmetrics >=1.0,<1.5" "torch ==2.1.2"

由于笔者当前的环境是 torch ==1.13.1 , pytorch-lightning ==1.19.5

故先安装 torch-geometric ==2.1.* 实验一下, 因为官方的pytorch-lightning >=2.0,<2.4" 已经适配了torch-geometric ==2.1.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值