gammagl.models.GAEModel

class GAEModel(feature_dim, hidden1_dim, hidden2_dim, drop_rate=0.0, num_layers=2, norm='none', name=None)[source]

Applications of Auto-Encoders on Graphs proposed in “Variational Graph Auto-Encoders” paper.

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

  • hidden1_dim (int) – hidden dimension.

  • hidden2_dim (int) – output dimension.

  • drop_rate (float) – dropout rate.

  • num_layers (int) – number of layers.

  • norm (str) – apply the normalizer.

  • name (str) – model name.

encode(x, edge_index, edge_weight, num_nodes)[source]
forward(x, edge_index, edge_weight, num_nodes)[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.