Skip to content

Commit 0fb4139

Browse files
Update src/GNNGraphs/transform.jl
Co-authored-by: Carlo Lucibello <[email protected]>
1 parent 31039e4 commit 0fb4139

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GNNGraphs/transform.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ function Flux.batch(gs::Vector{<:GNNGraph})
364364
if all(y -> isa(y, COO_T), [g.graph for g in gs] )
365365
edge_indices = [edge_index(g) for g in gs]
366366
nodesum = cumsum([0, nodes...])[1:end-1]
367-
s = reduce(vcat, [ei[1] .+ nodesum[ii] for (ii,ei) in enumerate(edge_indices)])
368-
t = reduce(vcat, [ei[2] .+ nodesum[ii] for (ii,ei) in enumerate(edge_indices)])
367+
s = cat_features([ei[1] .+ nodesum[ii] for (ii, ei) in enumerate(edge_indices)])
368+
t = cat_features([ei[2] .+ nodesum[ii] for (ii, ei) in enumerate(edge_indices)])
369369
w = reduce(vcat, [get_edge_weight(g) for g in gs])
370370
w = w isa Vector{Nothing} ? nothing : w
371371
graph = (s, t, w)

0 commit comments

Comments
 (0)