Open Qfl3x opened 2 years ago
What's your Flux version?
0.13.0 (Latest stable release)
Weird. I cannot reproduce your issue. Dataloader works well with loss function in my side.
I did it again. This time in an environment with nothing but GeometricFlux (and its dependencies) both 0.11.1 (Package manager) and the master branch. To give an idea, the program crashes with this message (both times): ERROR: LoadError: MethodError: no method matching length(::FeaturedSubgraph{FeaturedGraph{SparseGraph{false, SparseArrays.SparseMatrixCSC{Float32, UInt32}, Vector{UInt32}, Int64}, Matrix{Float32}, FillArrays.Fill{Float32, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, FillArrays.Fill{Float32, 1, Tuple{Base.OneTo{Int64}}}}, UnitRange{Int64}})
EDIT: Corrected Error message, sorry.
I tried to run the Semi-Supervised GCN example and it appears to be broken. The issue is that the loss and accuracy functions don't seem to work with the DataLoader. The DataLoader's Batches have the format (X,y) with
X
being the graph vector andy
being the(7*140*batch_size)
output tensor. The current loopfor (x,y) in batch
takes the wrong elements at the moment:As evident, this breaks the whole thing. I've tried using
zip
but it plays weird with they
tensor. So my solution was to loop as such:for (x, y) in [[batch[1][i], batch[2][:,:,i]] for i = 1:batch_size]
, and it solved it. Though it may create memory overhead.Julia Version 1.7.2