We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6322505 commit 6c4530fCopy full SHA for 6c4530f
src/layers/basic.jl
@@ -163,11 +163,22 @@ returns the dot product `x_i ⋅ xj` on each edge.
163
# Usage
164
165
```juliarepl
166
+julia> g = rand_graph(5, 6)
167
+GNNGraph:
168
+ num_nodes = 5
169
+ num_edges = 6
170
171
+julia> dotdec = DotDecoder()
172
+DotDecoder()
173
+
174
+julia> dotdec(g, rand(2, 5))
175
+1×6 Matrix{Float64}:
176
+ 0.345098 0.458305 0.106353 0.345098 0.458305 0.106353
177
```
178
"""
179
struct DotDecoder <: GNNLayer end
180
181
function (::DotDecoder)(g, x)
182
+ check_num_nodes(g, x)
183
apply_edges(xi_dot_xj, g, xi=x, xj=x)
184
end
0 commit comments