-
Notifications
You must be signed in to change notification settings - Fork 51
differentiable adjacency_matrix and degree #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
related to JuliaDiff/ChainRules.jl#586 |
f48d2da
to
c239b7e
Compare
The state of #113 on this branch is that we get a sparse vector instead of nothing: julia> g = rand_graph(3, 2, graph_type=:coo);
julia> x = rand(3, g.num_nodes);
julia> e = rand(g.num_edges);
julia> function forward_fused(g, x, e)
out = propagate(e_mul_xj, g, +; xj=x, e=e)
return sum(abs2, out)
end
forward_fused (generic function with 1 method)
julia> gradient(e -> forward_fused(g, x, e), e)[1]
2-element SparseVector{Float64, Int64} with 2 stored entries:
[1] = 2.22276
[2] = 0.489046 While this is a clear improvement it is still not ideal, we want a dense gradient returned. |
Codecov Report
@@ Coverage Diff @@
## master #123 +/- ##
==========================================
+ Coverage 84.12% 85.34% +1.21%
==========================================
Files 15 15
Lines 1266 1262 -4
==========================================
+ Hits 1065 1077 +12
+ Misses 201 185 -16
Continue to review full report at Codecov.
|
Opened an issue in Zygote FluxML/Zygote.jl#1174 |
Fix #113 for COO type