torch_geometric.nn.conv.SimpleConv
- class SimpleConv(aggr: Optional[Union[str, List[str], Aggregation]] = 'sum', combine_root: Optional[str] = None, **kwargs)[source]
Bases:
MessagePassingA simple message passing operator that performs (non-trainable) propagation
\[\mathbf{x}^{\prime}_i = \bigoplus_{j \in \mathcal{N(i)}} e_{ji} \cdot \mathbf{x}_j\]where \(\bigoplus\) defines a custom aggregation scheme.
- Parameters
aggr (str or [str] or Aggregation, optional) – The aggregation scheme to use, e.g.,
"add","sum""mean","min","max"or"mul". In addition, can be anyAggregationmodule (or any string that automatically resolves to it). (default:"sum")combine_root (str, optional) – Specifies whether or how to combine the central node representation (one of
"sum","cat","self_loop",None). (default:None)**kwargs (optional) – Additional arguments of
torch_geometric.nn.conv.MessagePassing.
- Shapes:
inputs: node features \((|\mathcal{V}|, F)\) or \(((|\mathcal{V_s}|, F), (|\mathcal{V_t}|, *))\) if bipartite, edge indices \((2, |\mathcal{E}|)\)
outputs: node features \((|\mathcal{V}|, F)\) or \((|\mathcal{V_t}|, F)\) if bipartite
- forward(x: Union[Tensor, Tuple[Tensor, Optional[Tensor]]], edge_index: Union[Tensor, SparseTensor], edge_weight: Optional[Tensor] = None, size: Optional[Tuple[int, int]] = None) Tensor[source]
Runs the forward pass of the module.
- reset_parameters()
Resets all learnable parameters of the module.