AI4Finance-Foundation / AI4Finance-Foundation/RLSolver

📝 Graph: Learning Combinatorial Optimization Algorithms over Graphs

Đang mở
#221 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
discussion
Ngôn ngữ chính
Python
Star
169
Fork
36
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

我们图上的组合优化问题,例如 Graph maxcut,下面的论文提出了对图结构进行了编码的方案:
- 论文 Learning Combinatorial Optimization Algorithms over Graphs (宋乐教授)
- 代码 https://github.com/Hanjun-Dai/graphnn

直接复现上面的代码,因为版本问题,不容易,我有以下建议:
- 建议复现他们的 PyTorch版本
- 建议安装PyTorch的 0.8.5 版本
- 建议安装 rdkit 和 boost 的最新版本

复现过程碰到问题,随时在这个issue 提出来。

---

## 建议复现他们的 PyTorch版本:
> Dec. 22, 2017 update: pytorch version of structure2vec
For people who prefer python, here is the pytorch implementation of s2v:
https://github.com/Hanjun-Dai/pytorch_structure2vec

## 建议安装PyTorch的 0.8.5 版本

2017年的PyTorch 的版本是 0.4 ~ 0.8:
- 太旧的PyTorch版本,可能现在新的电脑没法找到合适的 cuda
- 太新的PyTorch版本,可能和旧代码不匹配
- 所以我们建议下载**PyTorch 版本 0.8.5 (2018年的)**,对应的cuda version 让 conda 自动帮我们安装

0.x 版本的PyTorch 经常能看到下面的代码,这个在 0.8.5 之前都兼容
https://github.com/Hanjun-Dai/pytorch_structure2vec/blob/bcf20c90f21e468f862f13e2f5809a52cd247d4e/graph_classification/main.py#L7C1-L8C4
```
from torch.autograd import Variable
from torch.nn.parameter import Parameter
```

## 建议安装 rdkit 和 boost 的最新版本

和C++有关的,我建议安装最新的 rdkit 和 boost(rdkit一直都有维护) ,如果最新的版本安装后,发现依然编译不成功,才去降低版本**并更换C++编译器到对应的低版本**(能上网查到)

> The following versions have been tested. But newer versions should also be fine.
rdkit : [Q3 2017 Release](https://github.com/rdkit/rdkit/releases/tag/Release_2017_09_1, Release_2017_09_2)
boost : Boost 1.61.0, 1.65.1

## 运行

按Readme 的方式来

---

我之前单独抽取里面的 PyTorch 代码跑过它的推理过程,只需要PyTorch就好, rdkit 和 boost 这两个库用来提供“训练标签”,不想要完整复现,只想要了解网络结构的情况下,可以跳过。
https://github.com/Hanjun-Dai/pytorch_structure2vec/tree/master/s2v_lib

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.