gammagl.layers.conv.HPNConv¶
- class HPNConv(in_channels, out_channels, metadata, iter_K, alpha=0.1, negative_slope=0.2, drop_rate=0.5)[source]¶
The Heterogeneous Graph Propagation Operator from the “Heterogeneous Graph Propagation Network” paper.
Note
For an example of using HPNConv, see examples/hpn_trainer.py.
- Parameters:
in_channels (int, dict[str, int]) – Size of each input sample of every node type, or
-1to derive the size from the first input(s) to the forward method.out_channels (int) – Size of each output sample.
metadata (tuple[list[str], list[tuple[str, str, str]]]) – The metadata of the heterogeneous graph, i.e. its node and edge types given by a list of strings and a list of string triplets, respectively. See
gammagl.data.HeteroGraph.metadata()for more information.iter_K (int) – Number of iterations used in APPNPConv.
alpha (float, optional) – Parameters used in APPNPConv. (default:
0.1)negative_slope (float, optional) – LeakyReLU angle of the negative slope. (default:
0.2)dropout (float, optional) – Dropout probability of the normalized attention coefficients which exposes each node to a stochastically sampled neighborhood during training. (default:
0)