Need help with graphSAGE-pytorch?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

243 Stars 72 Forks 52 Commits 5 Opened issues


A PyTorch implementation of GraphSAGE. This package contains a PyTorch implementation of GraphSAGE.

Services available


Need anything else?

Contributors list

No Data

A PyTorch implementation of GraphSAGE

This package contains a PyTorch implementation of GraphSAGE.

Authors of this code package:

Tianwen Jiang ([email protected]), Tong Zhao ([email protected]), Daheng Wang ([email protected]).

Environment settings

  • python==3.6.8
  • pytorch==1.0.0

Basic Usage

Main Parameters:

--dataSet     The input graph dataset. (default: cora)
--agg_func    The aggregate function. (default: Mean aggregater)
--epochs      Number of epochs. (default: 50)
--b_sz        Batch size. (default: 20)
--seed        Random seed. (default: 824)
--unsup_loss  The loss function for unsupervised learning. ('margin' or 'normal', default: normal)
--config      Config file. (default: ./src/experiments.conf)
--cuda        Use GPU if declared.

Learning Method

The user can specify a learning method by --learnmethod, 'sup' is for supervised learning, 'unsup' is for unsupervised learning, and 'plusunsup' is for jointly learning the loss of supervised and unsupervised method.

Example Usage

To run the unsupervised model on Cuda:

python -m src.main --epochs 50 --cuda --learn_method unsup

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.