openhgnn.models.GTN¶
- class GTN(num_edge_type, num_channels, in_dim, hidden_dim, num_class, num_layers, category, norm, identity)[源代码]¶
GTN from paper Graph Transformer Networks in NeurIPS_2019. You can also see the extension paper Graph Transformer Networks: Learning Meta-path Graphs to Improve GNNs.
Given a heterogeneous graph \(G\) and its edge relation type set \(\mathcal{R}\).Then we extract the single relation adjacency matrix list. In that, we can generate combination adjacency matrix by conv the single relation adjacency matrix list. We can generate :math:’l-length’ meta-path adjacency matrix by multiplying combination adjacency matrix. Then we can generate node representation using a GCN layer.
- 参数:
num_edge_type (int) – Number of relations.
num_channels (int) – Number of conv channels.
in_dim (int) – The dimension of input feature.
hidden_dim (int) – The dimension of hidden layer.
num_class (int) – Number of classification type.
num_layers (int) – Length of hybrid metapath.
category (string) – Type of predicted nodes.
norm (bool) – If True, the adjacency matrix will be normalized.
identity (bool) – If True, the identity matrix will be added to relation matrix set.