pelican.layers.PELICANBlock
- class pelican.layers.PELICANBlock(hidden_channels, increase_hidden_channels=1.0, activation='leaky_relu', dropout_prob=None, **kwargs)[source]
Bases:
ModulePELICAN edge-to-edge aggregation block.
A single PELICAN block consisting of a feedforward network and edge-to-edge aggregation.
- Parameters:
hidden_channels (int) – Number of hidden channels.
increase_hidden_channels (float) – Factor to increase hidden channels in the feedforward network, by default 1.0.
activation (str) – Activation function to use (‘gelu’, ‘relu’, ‘leaky_relu’, ‘tanh’, ‘sigmoid’, ‘silu’), by default ‘leaky_relu’.
dropout_prob (float) – Dropout probability, by default None.
**kwargs – Additional keyword arguments to pass to the aggregator.
- forward(x, edge_index, batch, **kwargs)[source]
Forward pass of the PELICAN block.
- Parameters:
x (torch.Tensor) – Edge-level features of shape (E, C).
edge_index (torch.Tensor) – Edge index tensor of shape (2, E).
batch (torch.Tensor) – Batch tensor of shape (N).
**kwargs
- Returns:
x – Updated edge-level features of shape (E, C).
- Return type:
torch.Tensor