acbull / pyHGT

Code for "Heterogeneous Graph Transformer" (WWW'20), which is based on pytorch_geometric
MIT License
775 stars 162 forks source link

Heterogeneous graph classification #39

Open tehranixyz opened 3 years ago

tehranixyz commented 3 years ago

Hi, Thanks for making the source of HGT public.

A question that I have is that how can we use HGT to classify heterogeneous graphs? Currently, the training examples that are provided are for node classification where we have one object of class Graph. I was wondering how it's possible to have numerous objects of class Graph in which each object has a specific label. Any help in this regard is greatly appreciated.

acbull commented 3 years ago

For graph classification, you could either add a pooling layer over all node embeddings (such as average pooling), or add a virtual node in the graph as summary node.