gammagl.models.MixHopModel

class MixHopModel(feature_dim, hidden_dim, out_dim, p, drop_rate, num_layers=3, norm='both', name=None)[source]

MixHop proposed in “MixHop: Higher-Order Graph Convolutional Architectures via Sparsified Neighborhood Mixing” paper.

Parameters:
  • feature_dim (int) – input feature dimension.

  • hidden_dim (int) – hidden dimension.

  • out_dim (int) – The number of classes for prediction.

  • p (list) – The list of integer adjacency powers.

  • drop_rate (float) – dropout rate.

  • num_layers (int, optional) – Number of Mixhop Graph Convolutional Layers.

  • norm (str, optional) – apply the normalizer.

  • name (str, optional) – model name.

forward(x, edge_index, edge_weight, num_nodes=None)[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.