I am trying to train a gated graph neural network to predict molecular properties with GeometricFlux.jl: https://github.com/FluxML/GeometricFlux.jl
The inputs are FeaturedGraph objects of various morphologies. After quite a bit of trial-and-error, I have reached a point where the exception message is opaque to me and I do not know how to proceed. Code:
using Flux, GeometricFlux, MetaGraphs
# convert a MetaGraph to FeaturedGraph
mg = MetaGraph()
adj_mat = adjacency_matrix(mg)
g = FeaturedGraph(adj_mat; nf=ones(2, nv(mg)))
# train the model
model = Chain(GatedGraphConv(2, 1, aggr=:mean), softmax)
loss(x, y) = Flux.mse(model(x), y)
@Flux.epochs 1 Flux.train!(
loss,
Flux.params(model),
[(g, 1.0)],
ADAM()
)
The error message is: LoadError: MethodError: _pullback(::Zygote.Context, ::typeof(hcat)) is ambiguous.
Can anyone suggest what is wrong?