Closed oysteinsolheim closed 2 years ago
NNConv
has trickier interaction with the GNNChain since it also necessitates the edge features. Should be solved by #50. Will merge and tag new release as soon as tests pass.
I also got an error if I included a GlobalPool layer after the NNConv.
I thought I managed to work around it by including
(l::GlobalPool)(g::GNNGraph) = l(g, g.ndata.x)
and
GraphNeuralNetworks.applychain(::Tuple{},x) = x
.
but after further inspection it's not working.
Thanks for the heads up, keep them coming. It will be fixed in #52. It is a bit tricky to orchestrate node, edge, and graph features at the same time with a GNNChain. I'd like to push the functionality of GNNChain as far as I can, but in some complex scenarios explicitly defining the model (cf. https://carlolucibello.github.io/GraphNeuralNetworks.jl/dev/models/) could be the only option.
Thanks a lot! Yes, I'll have to revisit the explicit modelling, I forgot about that opportunity.
The following example raises a MethodError:
with error message
ERROR: MethodError: no method matching (::NNConv)(::GNNGraph{Tuple{Vector{Int64}, Vector{Int64}, Nothing}}, ::Matrix{Float64}) Closest candidates are: (::NNConv)(::GNNGraph, ::AbstractMatrix{T} where T, ::Any) at /home/oystein/JuliaProjects/GraphNeuralNetworks.jl/src/layers/conv.jl:480 (::NNConv)(::GNNGraph) at /home/oystein/JuliaProjects/GraphNeuralNetworks.jl/src/layers/conv.jl:495 (::GNNLayer)(::GNNGraph) at /home/oystein/JuliaProjects/GraphNeuralNetworks.jl/src/layers/basic.jl:12
Am I missing something here? Calling an individual layer with g is ok.