openhgnn.layers.MetapathConv¶
- class MetapathConv(meta_paths_dict, mods, macro_func, **kargs)[源代码]¶
MetapathConv is an aggregation function based on meta-path, which is similar with dgl.nn.pytorch.HeteroGraphConv. We could choose Attention/ APPNP or any GraphConvLayer to aggregate node features. After that we will get embeddings based on different meta-paths and fusion them.
\[\mathbf{Z}=\mathcal{F}(Z^{\Phi_1},Z^{\Phi_2},...,Z^{\Phi_p})=\mathcal{F}(f(H,\Phi_1),f(H,\Phi_2),...,f(H,\Phi_p))\]where \(\mathcal{F}\) denotes semantic fusion function, such as semantic-attention. \(\Phi_i\) denotes meta-path and \(f\) denotes the aggregation function, such as GAT, APPNP.