gammagl.models.HPN

class HPN(in_channels, out_channels, metadata, drop_rate, iter_K, hidden_channels=128, alpha=0.2, name=None)[source]

HPN proposed in “Heterogeneous Graph Propagation Network” paper.

Parameters:
  • in_channels (int) – input dimension of the feature.

  • out_channels (int) – output dimension of the feature.

  • metadata (Tuple[List[str], List[Tuple[str, str, str]]]) – the metadata of the heterogeneous graph.

  • drop_rate (float) – dropout probability.

  • iter_K (int) – number of iteration used in APPNPConv.

  • hidden_channels (int, optional) – hidden dimension of the feature.

  • alpha (float, optional) – parameters used in APPNPConv.

  • name (str, optional) – model name.

forward(x_dict, edge_index_dict, num_nodes_dict)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.