Skip to content

Commit

Permalink
[Tutorial] Update prerequisites of README (#380)
Browse files Browse the repository at this point in the history
* Update prerequisites of README

* dependencies for pytorch models

* dependencies for mxnet models

* minor
  • Loading branch information
giuseppefutia authored and lingfanyu committed Feb 12, 2019
1 parent 29dd22e commit 6c3dba8
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 16 deletions.
11 changes: 10 additions & 1 deletion examples/mxnet/gat/README.md
Expand Up @@ -7,8 +7,17 @@ Graph Attention Networks (GAT)

Note that the original code is implemented with Tensorflow for the paper.

### Dependencies
* MXNet nightly build
* requests

## Usage (make sure that DGLBACKEND is changed into mxnet)
```bash
pip install mxnet --pre
pip install requests
```


### Usage (make sure that DGLBACKEND is changed into mxnet)
```bash
DGLBACKEND=mxnet python gat_batch.py --dataset cora --gpu 0 --num-heads 8
```
4 changes: 3 additions & 1 deletion examples/mxnet/gcn/README.md
Expand Up @@ -4,11 +4,13 @@ Graph Convolutional Networks (GCN)
Paper link: [https://arxiv.org/abs/1609.02907](https://arxiv.org/abs/1609.02907)
Author's code repo: [https://github.com/tkipf/gcn](https://github.com/tkipf/gcn)

Requirements
Dependencies
------------
- MXNet nightly build
- requests

``bash
pip install mxnet --pre
pip install requests
``

Expand Down
9 changes: 8 additions & 1 deletion examples/mxnet/rgcn/README.md
Expand Up @@ -4,12 +4,19 @@
* Author's code for entity classification: [https://github.com/tkipf/relational-gcn](https://github.com/tkipf/relational-gcn)
* Author's code for link prediction: [https://github.com/MichSchli/RelationPrediction](https://github.com/MichSchli/RelationPrediction)

### Prerequisites
### Dependencies
Two extra python packages are needed for this example:

- MXNet nightly build
- requests
- rdflib
- pandas

```bash
pip install mxnet --pre
pip install requests rdflib pandas
```

Example code was tested with rdflib 4.2.2 and pandas 0.23.4

### Entity Classification
Expand Down
10 changes: 10 additions & 0 deletions examples/mxnet/sse/README.md
Expand Up @@ -4,6 +4,16 @@ Benchmark SSE on multi-GPUs
Paper link:
[http://proceedings.mlr.press/v80/dai18a/dai18a.pdf](http://proceedings.mlr.press/v80/dai18a/dai18a.pdf)

Dependencies
-------------
* MXNet nightly build
* requests

```bash
pip install mxnet --pre
pip install requests
```

Use a small embedding
---------------------

Expand Down
10 changes: 10 additions & 0 deletions examples/mxnet/tree_lstm/README.md
Expand Up @@ -6,6 +6,16 @@ This is a re-implementation of the following paper:
The provided implementation can achieve a test accuracy of 51.72 which is comparable with the result reported in the original paper: 51.0(±0.5).

## Dependencies
* MXNet nightly build
* requests
* nltk

```bash
pip install mxnet --pre
pip install requests nltk
```

## Data
The script will download the [SST dataset] (http://nlp.stanford.edu/sentiment/index.html) and the GloVe 840B.300d embedding automatically if `--use-glove` is specified (note: download may take a while).

Expand Down
14 changes: 12 additions & 2 deletions examples/pytorch/capsule/README.md
Expand Up @@ -4,10 +4,20 @@ DGL implementation of Capsule Network
This repo implements Hinton and his team's [Capsule Network](https://arxiv.org/abs/1710.09829).
Only margin loss is implemented, for simplicity to understand the DGL.

## Training& Evaluation
Dependencies
--------------
* PyTorch 0.4.1+
* torchvision

```bash
pip install torch torchvision
```

Training & Evaluation
----------------------
```bash
# Run with default config
python main.py
# Run with train and test batch size 128, and for 50 epochs
python main.py --batch-size 128 --test-batch-size 128 --epochs 50
```
```
2 changes: 1 addition & 1 deletion examples/pytorch/dgmg/README.md
Expand Up @@ -3,7 +3,7 @@
This is an implementation of [Learning Deep Generative Models of Graphs](https://arxiv.org/pdf/1803.03324.pdf) by
Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, Peter Battaglia.

## Dependency
## Dependencies
- Python 3.5.2
- [Pytorch 0.4.1](https://pytorch.org/)
- [Matplotlib 2.2.2](https://matplotlib.org/)
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/gat/README.md
Expand Up @@ -7,7 +7,7 @@ Graph Attention Networks (GAT)
- Popular pytorch implementation:
[https://github.com/Diego999/pyGAT](https://github.com/Diego999/pyGAT).

Requirements
Dependencies
------------
- torch v1.0: the autograd support for sparse mm is only available in v1.0.
- requests
Expand Down
5 changes: 3 additions & 2 deletions examples/pytorch/gcn/README.md
Expand Up @@ -5,12 +5,13 @@ Graph Convolutional Networks (GCN)
- Author's code repo: [https://github.com/tkipf/gcn](https://github.com/tkipf/gcn). Note that the original code is
implemented with Tensorflow for the paper.

Requirements
Dependencies
------------
- PyTorch 0.4.1+
- requests

``bash
pip install requests
pip install torch requests
``

Codes
Expand Down
11 changes: 9 additions & 2 deletions examples/pytorch/jtnn/README.md
@@ -1,9 +1,16 @@
Junction Tree VAE - example for training
===
==========================================

This is a direct modification from https://github.com/wengong-jin/icml18-jtnn

You need to have RDKit installed.
Dependencies
--------------
* PyTorch 0.4.1+
* RDKit
* requests

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

To run the model, use
```
Expand Down
12 changes: 12 additions & 0 deletions examples/pytorch/line_graph/README.md
Expand Up @@ -7,6 +7,18 @@ Author's code repo: [https://github.com/joanbruna/GNN_community](https://github.

This folder contains a DGL implementation of the CDGNN model.

Dependencies
--------------
* PyTorch 0.4.1+
* requests

```bash
pip install torch requests
```

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

An experiment on the Stochastic Block Model in default settings can be run with

```bash
Expand Down
12 changes: 8 additions & 4 deletions examples/pytorch/rgcn/README.md
Expand Up @@ -4,11 +4,15 @@
* Author's code for entity classification: [https://github.com/tkipf/relational-gcn](https://github.com/tkipf/relational-gcn)
* Author's code for link prediction: [https://github.com/MichSchli/RelationPrediction](https://github.com/MichSchli/RelationPrediction)

### Prerequisites
Two extra python packages are needed for this example:
### Dependencies
* PyTorch 0.4.1+
* requests
* rdflib
* pandas

- rdflib
- pandas
```
pip install requests torch rdflib pandas
```

Example code was tested with rdflib 4.2.2 and pandas 0.23.4

Expand Down
3 changes: 2 additions & 1 deletion examples/pytorch/transformer/README.md
Expand Up @@ -3,11 +3,12 @@ In this example we implement the [Transformer](https://arxiv.org/pdf/1706.03762.

The folder contains training module and inferencing module (beam decoder) for Transformer and training module for Universal Transformer

## Requirements
## Dependencies

- PyTorch 0.4.1+
- networkx
- tqdm
- requests

## Usage

Expand Down
9 changes: 9 additions & 0 deletions examples/pytorch/tree_lstm/README.md
Expand Up @@ -13,6 +13,15 @@ wget http://nlp.stanford.edu/data/glove.840B.300d.zip
unzip glove.840B.300d.zip
```

## Dependencies
* PyTorch 0.4.1+
* requests
* nltk

```
pip install torch requests nltk
```

## Usage
```
python train.py --gpu 0
Expand Down

0 comments on commit 6c3dba8

Please sign in to comment.