diff --git a/GNNLux/test/layers/temporalconv_test.jl b/GNNLux/test/layers/temporalconv_test.jl new file mode 100644 index 000000000..bdde7b325 --- /dev/null +++ b/GNNLux/test/layers/temporalconv_test.jl @@ -0,0 +1,15 @@ +@testitem "layers/temporalconv" setup=[SharedTestSetup] begin + using LuxTestUtils: test_gradients, AutoReverseDiff, AutoTracker, AutoForwardDiff, AutoEnzyme + + rng = StableRNG(1234) + g = rand_graph(10, 40, seed=1234) + x = randn(rng, Float32, 3, 10) + + @testset "TGCN" begin + l = TGCN(3=>3) + ps = LuxCore.initialparameters(rng, l) + st = LuxCore.initialstates(rng, l) + loss = (x, ps) -> sum(first(l(g, x, ps, st))) + test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()]) + end +end \ No newline at end of file