-
Notifications
You must be signed in to change notification settings - Fork 47
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
Graph classification: multiple graphs associated with a common label #282
Comments
This is an interesting application. g.ndata.x = rand(Float32, d, m, n) I'm not sure though that graph convolutions will handle properly these tensors. Ideally they should, so let me know how it goes. |
Thanks, that's very helpful. The approach doesn't work directly "out of the box", at least for
I did some testing with the same simple example discussed above, focusing mainly on the dimensions of the output as a sanity check.
The pooled features are a three-dimenisonal array of size Thanks again for your help. |
yes something like gnn = GNNChain(
GraphConv(d => out),
GraphConv(out => out),
GraphConv(out => out),
GlobalPool(+),
x -> reshape(x, size(x)[1:end-1])
) should work |
Hello, many thanks for a great package.
My task can be summarised as graph classification, where (i) multiple graphs are associated with a common label, and where (ii) all graphs have the same structure (i.e., only the node data changes between graphs).
For example, a single input instance may be:
The usual approach is to batch the graphs into a single super graph:
This approach is natural when the graph structure varies between graphs. However, it is inefficient when the graphs have a fixed structure (particularly with respect to memory, but presumably also in terms of performing the required operations during the propagation and readout modules).
It would be more efficient to use a single graph with
ndata
storing the replicated data in, for example, the third dimension:This gives an error, since
ndata
should containmatrices only, I thinkarrays with the last dimension equal to the number of nodes.Do you have any suggestions for how best to proceed, in a way that aligns with the philosophy of the package?
The text was updated successfully, but these errors were encountered: