MCPcopy
hub / github.com/tkipf/pygcn

github.com/tkipf/pygcn @main sqlite

repository ↗ · DeepWiki ↗
15 symbols 43 edges 6 files 4 documented · 27%
README

Graph Convolutional Networks in PyTorch

PyTorch implementation of Graph Convolutional Networks (GCNs) for semi-supervised classification [1].

For a high-level introduction to GCNs, see:

Thomas Kipf, Graph Convolutional Networks (2016)

Graph Convolutional Networks

Note: There are subtle differences between the TensorFlow implementation in https://github.com/tkipf/gcn and this PyTorch re-implementation. This re-implementation serves as a proof of concept and is not intended for reproduction of the results reported in [1].

This implementation makes use of the Cora dataset from [2].

Installation

python setup.py install

Requirements

  • PyTorch 0.4 or 0.5
  • Python 2.7 or 3.6

Usage

python train.py

References

[1] Kipf & Welling, Semi-Supervised Classification with Graph Convolutional Networks, 2016

[2] Sen et al., Collective Classification in Network Data, AI Magazine 2008

Cite

Please cite our paper if you use this code in your own work:

@article{kipf2016semi,
  title={Semi-Supervised Classification with Graph Convolutional Networks},
  author={Kipf, Thomas N and Welling, Max},
  journal={arXiv preprint arXiv:1609.02907},
  year={2016}
}

Core symbols most depended-on inside this repo

accuracy
called by 3
pygcn/utils.py
normalize
called by 2
pygcn/utils.py
train
called by 1
pygcn/train.py
test
called by 1
pygcn/train.py
reset_parameters
called by 1
pygcn/layers.py
encode_onehot
called by 1
pygcn/utils.py
load_data
called by 1
pygcn/utils.py
sparse_mx_to_torch_sparse_tensor
called by 1
pygcn/utils.py

Shape

Function 7
Method 6
Class 2

Languages

Python100%

Modules by API surface

pygcn/utils.py5 symbols
pygcn/layers.py5 symbols
pygcn/models.py3 symbols
pygcn/train.py2 symbols

For agents

$ claude mcp add pygcn \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact