-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
GCNConv and SimpleWeightedGraphs #106
Comments
Sorry to be late. Could you update GeometricFlux and try that again? |
Unfortunately, I get the same error even after updating. |
Should be resolved. |
If you're still interested, you could try new version. If you have any questions just comment down. |
This error (or something like it) seems to be present in the most recent version (0.13.10). Given fgs = [
FeaturedGraph(
SimpleGraph(g);
nf=[get_prop(g, v, :label) for v in vertices(g)]',
ef=[get_prop(g, e, :label) for e in edges(g)]'
)
for g in graphs
]
GCNConv(1 => 10, relu)(fgs[1]) # ❌ InexactError Casting the node features to an actual matrix solves the problem: fgs = [
FeaturedGraph(
SimpleGraph(g);
nf=Float32.([get_prop(g, v, :label) for v in vertices(g)]'),
ef=[get_prop(g, e, :label) for e in edges(g)]'
)
for g in graphs
]
GCNConv(1 => 10, relu)(fgs[1]) # ✔️ |
Having trouble using a SimpleWeightedGraph as input for the GCNConv-layer.
My graph is an undirected simple Int64 graph with Float64 weights and calling adjacency_matrix() on this works fine.
But during training I get the error
InexactError: Int64(-1.0384249352874253)
Stacktrace:
[1] Int64 at .\float.jl:710 [inlined]
[2] _map_zeropres!(::Type{Int64}, ::SparseMatrixCSC{Int64,Int64}, ::SparseMatrixCSC{Float64,Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\SparseArrays\src\higherorderfns.jl:246
[3] _noshapecheck_map(::Type{Int64}, ::SparseMatrixCSC{Float64,Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\SparseArrays\src\higherorderfns.jl:165
[4] copy at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\SparseArrays\src\higherorderfns.jl:169 [inlined]
[5] materialize(::Base.Broadcast.Broadcasted{SparseArrays.HigherOrderFns.SparseMatStyle,Nothing,Type{Int64},Tuple{SparseMatrixCSC{Float64,Int64}}}) at .\broadcast.jl:837
[6] adjacency_matrix(::SimpleWeightedGraph{Int64,Float64}, ::DataType; dir::Symbol) at C:\Users\rcars.julia\packages\SimpleWeightedGraphs\IDzOp\src\overrides.jl:32
[7] adjacency_matrix at C:\Users\rcars.julia\packages\SimpleWeightedGraphs\IDzOp\src\overrides.jl:31 [inlined]
[8] adjacency_matrix at C:\Users\rcars.julia\packages\GraphSignals\dB9OV\src\linalg.jl:7 [inlined] (repeats 2 times)
[9] _pullback at C:\Users\rcars.julia\packages\Zygote\chgvX\src\lib\grad.jl:8 [inlined]
and I don't see why it tries to change the values to Int64.
Does anyone have an idea?
The text was updated successfully, but these errors were encountered: