Skip to content

Commit

Permalink
Update conv_tests.jl: checking test
Browse files Browse the repository at this point in the history
  • Loading branch information
rbSparky authored Sep 4, 2024
1 parent b94b1f6 commit 91fed90
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions GNNLux/test/layers/conv_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,26 @@
test_lux_layer(rng, l, g, x, sizey=(out_dims,g.num_nodes), container=true)
end



@testset "NNConv" begin
edim = 10
nn = Dense(edim, in_dims * out_dims)
l = NNConv(in_dims => out_dims, nn, tanh, aggr = +)
test_lux_layer(rng, l, g2, x, sizey=(out_dims, g2.num_nodes), container=true, edge_weight=g2.edata.e)
n_in = 3
n_in_edge = 10
n_out = 5

s = [1,1,2,3]
t = [2,3,1,1]
g2 = GNNGraph(s, t)

nn = Dense(n_in_edge => n_out * n_in)
l = NNConv(n_in => n_out, nn, tanh, aggr = +)
x = randn(Float32, n_in, g2.num_nodes)
e = randn(Float32, n_in_edge, g2.num_edges)
y = l(g, x, e) # just to see if it runs without an error
#edim = 10
#nn = Dense(edim, in_dims * out_dims)
#l = NNConv(in_dims => out_dims, nn, tanh, aggr = +)
#test_lux_layer(rng, l, g2, x, sizey=(out_dims, g2.num_nodes), container=true, edge_weight=g2.edata.e)
end

@testset "MEGNetConv" begin
Expand Down

0 comments on commit 91fed90

Please sign in to comment.