gigl.src.common.models.pyg.nn.conv.gin_conv#

Classes#

GINEConv

Modified version of PyG's GINE conv implementation

Module Contents#

class gigl.src.common.models.pyg.nn.conv.gin_conv.GINEConv(nn, eps=0.0, train_eps=False, edge_dim=None, **kwargs)[source]#

Bases: torch_geometric.nn.conv.MessagePassing

Modified version of PyG’s GINE conv implementation pyg-team/pytorch_geometric

PyG’s implementation assumes edge_attr is always present, see the message function for more details

Initialize internal Module state, shared by both nn.Module and ScriptModule.

Parameters:
  • nn (torch.nn.Module)

  • eps (float)

  • train_eps (bool)

  • edge_dim (Optional[int])

forward(x, edge_index, edge_attr=None, size=None)[source]#

Runs the forward pass of the module.

Parameters:
  • x (Union[torch.Tensor, torch_geometric.typing.OptPairTensor])

  • edge_index (torch_geometric.typing.Adj)

  • edge_attr (torch_geometric.typing.OptTensor)

  • size (torch_geometric.typing.Size)

Return type:

torch.Tensor

message(x_j, edge_attr)[source]#

PyG’s implementation assumes edge_attr to be present, we allow None for edge_attr

Parameters:
  • x_j (torch.Tensor)

  • edge_attr (torch_geometric.typing.OptTensor)

Return type:

torch.Tensor

reset_parameters()[source]#

Resets all learnable parameters of the module.

initial_eps = 0.0[source]#
nn[source]#