seongjunyun / Graph_Transformer_Networks

Graph Transformer Networks (Authors' PyTorch implementation for the NeurIPS 19 paper)
960 stars 179 forks source link

How to deal with normal graphs? #6

Closed Abhinav43 closed 4 years ago

Abhinav43 commented 4 years ago

Hi, I am going through your code and paper. I want to apply your code on Cora, Citeseer types of graph and compare the result with GCN and GAT. So in Cora, Citeseer :

The feature matrix is N x F
Adj matrix is N x N
and Labels are one hot encoded 

The result you shown in paper is only on the heterogeneous graph. How can I apply on Cora, Citeseer dataset with feature and adj matrix information?

Can you please share the code?

Thank you for this awesome work :)

Abhinav43 commented 4 years ago

@seongjunyun Can you please take a look at this? How I can utilize this network for normal graphs? I tried to make adj matrix [ n , n , 1 , 1 ] that will be similar like a normal graph but how to modify code and deal with [n x n ] adj matrix directly and apply this code on Cora, citeseer type of graphs.

seongjunyun commented 4 years ago

Sorry for late reply. If you utilize this network for just homogeneous graphs, then you can only consider relations between multi-hops. So adj matrices have two graphs (homogeneous graph and identity matrix). You can make them by just stacking an adj matrix of the original graph(e.g. Cora) and an identity matrix Thank you.