-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add DConv
layer
#441
Add DConv
layer
#441
Conversation
h = l.weights[1,1,:,:] * x .+ l.weights[2,1,:,:] * x | ||
|
||
T0 = x | ||
if l.K > 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For K=1
this layer is the identity, is that correct?
src/layers/conv.jl
Outdated
end | ||
|
||
function (l::DConv)(g::GNNGraph, x::AbstractMatrix) | ||
A = adjacency_matrix(g, weighted = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of materializing the adjacency matrix, which currently gives a dense matrix on gpu therefore inconvenient for large graphs, the operations should be expressed through the propagate framework that relies on gather/scatter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not found a way to use propagate on the transpose adjacency matrix. Should I implement the Graphs.reverse
function for GNNGraph
to do this?(but probably will not be GPU compatible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manage to create the reverse of the graph and it is GPU compatible.
Co-authored-by: Carlo Lucibello <[email protected]>
Co-authored-by: Carlo Lucibello <[email protected]>
Co-authored-by: Carlo Lucibello <[email protected]>
Co-authored-by: Carlo Lucibello <[email protected]>
This PR adds the Diffusion Convolutional Layer of the following paper https://arxiv.org/pdf/1707.01926