Giter VIP home page Giter VIP logo

p-gnn's Introduction

Position-aware Graph Neural Networks

This repository is the official PyTorch implementation of "Position-aware Graph Neural Networks".

Jiaxuan You, Rex Ying, Jure Leskovec, Position-aware Graph Neural Networks, ICML 2019 (long oral).

Installation

  • Install PyTorch (tested on 1.0.0), please refer to the offical website for further details
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
  • Install PyTorch Geometric (tested on 1.1.2), please refer to the offical website for further details
pip install --verbose --no-cache-dir torch-scatter
pip install --verbose --no-cache-dir torch-sparse
pip install --verbose --no-cache-dir torch-cluster
pip install --verbose --no-cache-dir torch-spline-conv (optional)
pip install torch-geometric
  • Install networkx (tested on 2.3), make sure you are not using networkx 1.x version!
pip install networkx
  • Install tensorboardx
pip install tensorboardX
  • If you wish to use PPI dataset, unzip data/ppi.zip

Run

  • 3-layer GCN, grid
python main.py --model GCN --layer_num 3 --dataset grid
  • 2-layer P-GNN, grid
python main.py --model PGNN --layer_num 2 --dataset grid
  • 2-layer P-GNN, grid, with 2-hop shortest path distance
python main.py --model GCN --layer_num 2 --approximate 2 --dataset grid
  • 3-layer GCN, all datasets
python main.py --model GCN --layer_num 3 --dataset All
  • 2-layer PGNN, all datasets
python main.py --model PGNN --layer_num 2 --dataset All

You are highly encouraged to tune all kinds of hyper-parameters to get better performance. We only did very limited hyper-parameter tuning.

We recommend using tensorboard to monitor the training process. To do this, you may run

tensorboard --logdir runs

p-gnn's People

Contributors

jiaxuanyou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.