Diego999 / pyGAT

Pytorch implementation of the Graph Attention Network model by Veličković et. al (2017, https://arxiv.org/abs/1710.10903)
MIT License
2.87k stars 687 forks source link

How to apply this model to extract graph features from multiple graphs? #80

Open BrainLyh opened 1 year ago

BrainLyh commented 1 year ago

Can I understand that the current dataset "cora" in the project only contains one graph, and how can I modify the code to utilize data from multiple graphs for training and generate overall graph embeddings?

hh-hh19 commented 1 year ago

Can I understand that the current dataset "cora" in the project only contains one graph, and how can I modify the code to utilize data from multiple graphs for training and generate overall graph embeddings?

As I understand it, GAT can only get embeddings for nodes. If you want to get full-graph embeddings, you need a graph pool method, such as diffpool

GitHubSOLUTE commented 1 month ago

Can I understand that the current dataset "cora" in the project only contains one graph, and how can I modify the code to utilize data from multiple graphs for training and generate overall graph embeddings?

Do u know how to utilize data from multiple graphs for training now?

GitHubSOLUTE commented 1 month ago

Can I understand that the current dataset "cora" in the project only contains one graph, and how can I modify the code to utilize data from multiple graphs for training and generate overall graph embeddings?

As I understand it, GAT can only get embeddings for nodes. If you want to get full-graph embeddings, you need a graph pool method, such as diffpool

The question is, now the model's input is like one graph, do I need to change the model' input or architecture?