gammagl.models.SimpleHGNModel

class SimpleHGNModel(feature_dims, hidden_dim, edge_dim, heads_list, num_etypes, num_classes, num_layers, activation, feat_drop, attn_drop, negative_slope, residual, beta)[source]

This is a model SimpleHGN from Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous graph neural networks paper.

Parameters:
  • feature_dims (list) – Dimension list of feature vectors in original input.

  • hidden_dim (int) – Dimension of feature vector in AGNN.

  • edge_dim – The edge dimension.

  • heads_list (list) – The list of the number of heads in each layer.

  • num_etypes (int) – The number of the edge type.

  • num_classes (int) – The number of the output classes.

  • num_layers (int) – The number of layers we used.

  • activation – Activation function we used.

  • feat_drop (float) – The feature drop rate.

  • attn_drop (float) – The attention score drop rate.

  • negative_slope (float) – The negative slope used in the LeakyReLU.

  • residual (bool) – Whether we need the residual operation.

  • beta (float) – The hyperparameter used in edge residual.

forward(x, edge_index, e_feat)[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.