README.md 924 Bytes
Newer Older
GaiYu0's avatar
GaiYu0 committed
1
2
3
Community Detection with Graph Neural Networks (CDGNN)
============

4
Paper link: [https://openreview.net/pdf?id=H1g0Z3A9Fm](https://openreview.net/pdf?id=H1g0Z3A9Fm)
GaiYu0's avatar
GaiYu0 committed
5

6
Author's code repo: [https://github.com/zhengdao-chen/GNN4CD](https://github.com/zhengdao-chen/GNN4CD)
GaiYu0's avatar
GaiYu0 committed
7
8
9

This folder contains a DGL implementation of the CDGNN model.

10
11
12
13
14
15
16
17
18
19
20
21
Dependencies
--------------
* PyTorch 0.4.1+
* requests

```bash
pip install torch requests
```

How to run
----------

GaiYu0's avatar
GaiYu0 committed
22
23
24
An experiment on the Stochastic Block Model in default settings can be run with

```bash
Chao Ma's avatar
Chao Ma committed
25
python3 train.py
GaiYu0's avatar
GaiYu0 committed
26
27
28
29
```

An experiment on the Stochastic Block Model in customized settings can be run with
```bash
Chao Ma's avatar
Chao Ma committed
30
python3 train.py --batch-size BATCH_SIZE --gpu GPU --n-communities N_COMMUNITIES \
31
32
                --n-features N_FEATURES --n-graphs N_GRAPH --n-iterations N_ITERATIONS \
                --n-layers N_LAYER --n-nodes N_NODE --model-path MODEL_PATH --radius RADIUS
GaiYu0's avatar
GaiYu0 committed
33
```