I was reading the document and found that there is an official implementation of hgtconv ( HGTConv — DGL 1.1 documentation).
However I have a question about passing the parameters of hgtconv when forwarding, where it says that you need to pass in the parameters ntype
, etype
, both of which are one-dimensional Integer tensor respectively.
Does this mean that you need to pass type number of each node of the heterogeneous graph, for example, two vertices a
,b
, while a
vertex type is author
, its type number is 0, b
vertex type is paper
, its type number is 1, do I need to pass such a ntype
parameter tensor ([0, 1])
Also, when I read the code implementation from OpenHGNN OpenHGNN/HGT.py at main · BUPT-GAMMA/OpenHGNN (github.com),
I found that it passed in g.ndata['_TYPE']
, g.edata['_TYPE']
, which made me a bit confused, because g.ndata
, g.edata
seems to be the features of nodes and edges.