1
1
"""
2
- propagate(fmsg, g, aggr [layer] ; [xi, xj, e])
3
- propagate(fmsg, g, aggr, [layer,] xi, xj, e=nothing)
2
+ propagate(fmsg, g, aggr; [xi, xj, e])
3
+ propagate(fmsg, g, aggr xi, xj, e=nothing)
4
4
5
5
Performs message passing on graph `g`. Takes care of materializing the node features on each edge,
6
6
applying the message function `fmsg`, and returning an aggregated message ``\\ bar{\\ mathbf{m}}``
7
7
(depending on the return value of `fmsg`, an array or a named tuple of
8
8
arrays with last dimension's size `g.num_nodes`).
9
9
10
- If also a [`GNNLayer`](@ref) `layer` is provided, it will be passed to `fmsg`
11
- as a first argument.
12
-
13
10
It can be decomposed in two steps:
14
11
15
12
```julia
@@ -35,10 +32,8 @@ providing as input `f` a closure.
35
32
with the same batch size. If also `layer` is passed to propagate,
36
33
the signature of `fmsg` has to be `fmsg(layer, xi, xj, e)`
37
34
instead of `fmsg(xi, xj, e)`.
38
- - `layer`: A [`GNNLayer`](@ref). If provided it will be passed to `fmsg` as a first argument.
39
35
- `aggr`: Neighborhood aggregation operator. Use `+`, `mean`, `max`, or `min`.
40
36
41
-
42
37
# Examples
43
38
44
39
```julia
86
81
# # APPLY EDGES
87
82
88
83
"""
89
- apply_edges(fmsg, g, [layer] ; [xi, xj, e])
90
- apply_edges(fmsg, g, [layer,] xi, xj, e=nothing)
84
+ apply_edges(fmsg, g; [xi, xj, e])
85
+ apply_edges(fmsg, g, xi, xj, e=nothing)
91
86
92
87
Returns the message from node `j` to node `i` applying
93
88
the message function `fmsg` on the edges in graph `g`.
@@ -99,9 +94,6 @@ The function `fmsg` operates on batches of edges, therefore
99
94
`xi`, `xj`, and `e` are tensors whose last dimension
100
95
is the batch size, or can be named tuples of
101
96
such tensors.
102
-
103
- If also a [`GNNLayer`](@ref) `layer` is provided, it will be passed to `fmsg`
104
- as a first argument.
105
97
106
98
# Arguments
107
99
@@ -117,7 +109,6 @@ as a first argument.
117
109
with the same batch size. If also `layer` is passed to propagate,
118
110
the signature of `fmsg` has to be `fmsg(layer, xi, xj, e)`
119
111
instead of `fmsg(xi, xj, e)`.
120
- - `layer`: A [`GNNLayer`](@ref). If provided it will be passed to `fmsg` as a first argument.
121
112
122
113
See also [`propagate`](@ref) and [`aggregate_neighbors`](@ref).
123
114
"""
0 commit comments