Bases: MessagePassing
The FiLM graph convolutional operator from the “GNN-FiLM: Graph Neural Networks with Feature-wise Linear Modulation” paper.
\[\mathbf{x}^{\prime}_i = \sum_{r \in \mathcal{R}} \sum_{j \in \mathcal{N}(i)} \sigma \left( \boldsymbol{\gamma}_{r,i} \odot \mathbf{W}_r \mathbf{x}_j + \boldsymbol{\beta}_{r,i} \right)\]
where \(\boldsymbol{\beta}_{r,i}, \boldsymbol{\gamma}_{r,i} = g(\mathbf{x}_i)\) with \(g\) being a single linear layer by default. Self-loops are automatically added to the input graph and represented as its own relation type.
in_channels (int or 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.
out_channels (int) – Size of each output sample.
num_relations (int, optional) – Number of relations. (default: 1
)
nn (torch.nn.Module, optional) – The neural network \(g\) that maps node features x_i
of shape [-1, in_channels]
to shape [-1, 2 * out_channels]
. If set to None
, \(g\) will be implemented as a single linear layer. (default: None
)
act (callable, optional) – Activation function \(\sigma\). (default: torch.nn.ReLU()
)
aggr (str, optional) – The aggregation scheme to use ("add"
, "mean"
, "max"
). (default: "mean"
)
**kwargs (optional) – Additional arguments of torch_geometric.nn.conv.MessagePassing
.
input: node features \((|\mathcal{V}|, F_{in})\) or \(((|\mathcal{V_s}|, F_{s}), (|\mathcal{V_t}|, F_{t}))\) if bipartite, edge indices \((2, |\mathcal{E}|)\), edge types \((|\mathcal{E}|)\)
output: node features \((|\mathcal{V}|, F_{out})\) or \((|\mathcal{V_t}|, F_{out})\) if bipartite
Runs the forward pass of the module.
Resets all learnable parameters of the module.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4