Closed YichengDWu closed 2 years ago
Related to https://github.com/FluxML/NNlib.jl/issues/411
using GraphNeuralNetworks using CUDA using Flux: gpu g = rand_graph(10, 30) |> gpu g = add_edges(g,[10],[10]) x = CUDA.rand(3, 9) #9<10! apply_edges((xi, xj, e) -> xi .+ xj, g, xi=x, xj=x)
This won't throw an error. Maybe we can add
@assert size(xi)[end]==size(xj)[end]==g.num_nodes
inside apply_edges
apply_edges
Even if we have bounds checking we should still add this line of code since we also don't want size(x)[end]>g.num_nodes. It just doesn't make sense.
size(x)[end]>g.num_nodes
Related to https://github.com/FluxML/NNlib.jl/issues/411
This won't throw an error. Maybe we can add
inside
apply_edges