Skip to content

Commit a94ca7c

Browse files
authored
Merge pull request #60 from yuehhua/fix
Fix reference bug
2 parents d8b3437 + 8b46526 commit a94ca7c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/graph/simplegraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ end
1111
function GCNConv(g::AbstractSimpleGraph, ch::Pair{<:Integer,<:Integer}, σ = identity;
1212
init = glorot_uniform, T::DataType=Float32, bias::Bool=true)
1313
b = bias ? init(ch[2]) : zeros(T, ch[2])
14-
fg = FeaturedGraph(Ref(g), Ref(nothing))
14+
fg = FeaturedGraph(g, nothing)
1515
GCNConv(init(ch[2], ch[1]), b, σ, fg)
1616
end
1717

src/graph/weightedgraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ end
1010
function GCNConv(g::AbstractSimpleWeightedGraph, ch::Pair{<:Integer,<:Integer}, σ = identity;
1111
init = glorot_uniform, T::DataType=Float32, bias::Bool=true)
1212
b = bias ? init(ch[2]) : zeros(T, ch[2])
13-
fg = FeaturedGraph(Ref(g), Ref(nothing))
13+
fg = FeaturedGraph(g, nothing)
1414
GCNConv(init(ch[2], ch[1]), b, σ, fg)
1515
end
1616

test/graph/metagraphs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ dg = MetaDiGraph(sg)
5555
gc = GCNConv(ug, in_channel=>out_channel)
5656
@test size(gc.weight) == (out_channel, in_channel)
5757
@test size(gc.bias) == (out_channel,)
58-
@test graph(gc.graph)[] === ug.graph
58+
@test graph(gc.graph) === ug.graph
5959

6060
gc = GCNConv(dg, in_channel=>out_channel)
6161
@test size(gc.weight) == (out_channel, in_channel)
6262
@test size(gc.bias) == (out_channel,)
63-
@test graph(gc.graph)[] === dg.graph
63+
@test graph(gc.graph) === dg.graph
6464
end
6565

6666
@testset "ChebConv" begin

test/graph/simplegraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ el_dg = Vector{Int64}[[3, 6], [3, 5], [4, 5], [], [], []]
6363
gc = GCNConv(ug, in_channel=>out_channel)
6464
@test size(gc.weight) == (out_channel, in_channel)
6565
@test size(gc.bias) == (out_channel,)
66-
@test graph(gc.graph)[] === ug
66+
@test graph(gc.graph) === ug
6767
end
6868

6969
@testset "ChebConv" begin

test/graph/weightedgraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ el_dg = Vector{Int64}[[3, 6], [3, 5], [4, 5], [], [], []]
6363
gc = GCNConv(ug, in_channel=>out_channel)
6464
@test size(gc.weight) == (out_channel, in_channel)
6565
@test size(gc.bias) == (out_channel,)
66-
@test graph(gc.graph)[] === ug
66+
@test graph(gc.graph) === ug
6767
end
6868

6969
@testset "ChebConv" begin

0 commit comments

Comments
 (0)