GeometricFlux.jl: Geometric Deep Learning on Flux
They can be represented as a graph structure.
I worked on SparseArrays and CuArrays.CUSPARSE
## Model
model = Chain(GCNConv(g, num_features=>1000, relu),
GCNConv(g, 1000=>500, relu),
Dense(500, 7),
softmax)
## Loss
loss(x, y) = crossentropy(model(x), y)
accuracy(x, y) = mean(onecold(model(x)) .== onecold(y))
## Training
ps = Flux.params(model)
train_data = [(train_X, train_y)]
opt = ADAM(0.01)
evalcb() = @show(accuracy(train_X, train_y))
Flux.train!(loss, ps, train_data, opt, cb=throttle(evalcb, 10))
g = SimpleGraph(5)
add_edge!(1, 2); add_edge!(3, 4)
GCNConv(g, num_features=>1000, relu)
GeometricFlux with Zygote on GPU is not available. There are some issues to work on...
For GPU, I will getting Tracker work first.
$h_v^t$: vertex features, $e_{uv}$: edge features, $N(v)$: neighbors of vertex $v$