twjiang / graphSAGE-pytorch

A PyTorch implementation of GraphSAGE. This package contains a PyTorch implementation of GraphSAGE.
621 stars 150 forks source link

How to perform the inductive learning? #14

Closed gangwu001 closed 4 years ago

gangwu001 commented 4 years ago

This implementation seems to be transductive learning, which is reflected in Line-279, models.py. Self.adj_lists includes all nodes and edges of the graph. How to conduct the inductive learning? Thank you!

zhao-tong commented 4 years ago

Hi, to make it work for inductive learning, you would need to update the data (features and adj_lists) every time before and after you evaluate the model in each epoch.

gangwu001 commented 4 years ago

Fine, thanks for your reply! I construct train_adj_list and test_adj_lists. The former only contains train nodes set, while the latter includes all nodes.