这是一个收集图池化方法,便于对比实验和后续改进的开源库。
- TuDataset
- D&D
- PROTEINS
- ENZYMES
- NCI1/NCI109
- Reddit-Binary
- OGB
- ogbg-molhiv
- ogbg-ppa
- ogbg-code2
- GCN:
layers/gcn_layer.py
- GIN:
layers/gin_layer.py
- GraphSAGE:
layers/graphsage_layer.py
- set2set
- sagpool(sequence/hierarchical)
- Graph U-net
- Diffpool
- mean
- max
- sum
在configs文件夹下创建config.json文件,内容格式示例如下:
{
"dataset_name": ["ENZYMES"],
"batch_size": 2,
"epochs": 100,
"seed": [1,2,3,4,5],
"model":"global",
"gnn_type": "gcn",
"num_layer": 3,
"emb_dim": 300,
"drop_ratio": 0.5,
"virtual_node": "False",
"residual": "False",
"JK": "last",
"pooling": "sagpool",
"sagpool": {
"keep_ratio": 0.8,
"activation": "tanh",
"layer_num": 1
}
}
当键对应的值为列表时,将会通过排列组合将所有的组合都运行一次,并记录最终结果至以dataset_name_pooling命名的csv文件中。 目前支持列表的键:
- dataset_name
- seed
python graphpoolinggarden/train.py --config configs/config.json