Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Model] Improve GAT models #348

Merged
merged 6 commits into from
Jan 11, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/mxnet/gat/gat_batch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

"""
Graph Attention Networks
Paper: https://arxiv.org/abs/1710.10903
Expand Down
34 changes: 29 additions & 5 deletions examples/pytorch/gat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,39 @@ Graph Attention Networks (GAT)
============

- Paper link: [https://arxiv.org/abs/1710.10903](https://arxiv.org/abs/1710.10903)
- Author's code repo:
- Author's code repo (in Tensorflow):
[https://github.com/PetarV-/GAT](https://github.com/PetarV-/GAT).
- Popular pytorch implementation:
[https://github.com/Diego999/pyGAT](https://github.com/Diego999/pyGAT).

Note that the original code is implemented with Tensorflow for the paper.
Requirements
------------
- torch v1.0: the autograd support for sparse mm is only available in v1.0.
- requests

Results
-------
```bash
pip install torch==1.0.0 requests
```

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

Run with following (available dataset: "cora", "citeseer", "pubmed")
```bash
python gat.py --dataset cora --gpu 0 --num-heads 8
python train.py --dataset=cora --gpu=0
```

Results
-------

| Dataset | Test Accuracy | Time(s) | Baseline#1 times(s) | Baseline#2 times(s) |
| ------- | ------------- | ------- | ------------------- | ------------------- |
| Cora | 84.0% | 0.0127 | 0.0982 (**7.7x**) | 0.0424 (**3.3x**) |
| Citeseer | 70.5% | 0.0123 | n/a | n/a |
| Pubmed | 77.3% | 0.0302 | n/a | n/a |

* All the accuracy numbers are obtained after 200 epochs.
* The time measures how long it takes to train one epoch.
* All time is measured on EC2 p3.2xlarge instance w/ V100 GPU.
* Baseline#1: [https://github.com/PetarV-/GAT](https://github.com/PetarV-/GAT).
* Baseline#2: [https://github.com/Diego999/pyGAT](https://github.com/Diego999/pyGAT).
261 changes: 0 additions & 261 deletions examples/pytorch/gat/gat.py

This file was deleted.

Loading