We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 355d352 commit e012247Copy full SHA for e012247
1 file changed
GNNlib/src/utils.jl
@@ -91,7 +91,7 @@ function softmax_edge_neighbors(g::AbstractGNNGraph, e)
91
end
92
s, t = edge_index(g)
93
if isempty(t)
94
- return zero(eltype(e))
+ return zeros_like(e, eltype(e), (size(e)[1:end-1]..., 0))
95
96
max_ = gather(scatter(max, e, t), t)
97
num = exp.(e .- max_)
0 commit comments