gammagl.models.FILMModel

class FILMModel(in_channels, hidden_dim, out_channels, num_layers, drop_rate, name=None)[source]

The FiLM graph convolutional operator from the “GNN-FiLM: Graph Neural Networks with Feature-wise Linear Modulation” paper.

Parameters:
  • in_channels (int, tuple) – Size of each input sample, or -1 to derive the size from the first input(s) to the forward method. A tuple corresponds to the sizes of source and target dimensionalities.

  • hidden_dim (int) – Size of each hidden layers sample.

  • out_channels (int) – Size of each output sample.

  • drop_rate (float) – Rate of dropout layers.

  • name (str, optional) – Name of the model.

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