Skip to content

Commit 2557096

Browse files
fix Lux
1 parent a0a46d4 commit 2557096

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

GNNLux/test/layers/temporalconv.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@testitem "layers/temporalconv" setup=[TestModuleLux] begin
22
using .TestModuleLux
3-
using LuxTestUtils: test_gradients, AutoReverseDiff, AutoTracker, AutoForwardDiff, AutoEnzyme
3+
using LuxTestUtils: test_gradients, AutoTracker, AutoForwardDiff, AutoEnzyme
44

55
rng = StableRNG(1234)
66
g = rand_graph(rng, 10, 40)
@@ -16,7 +16,7 @@
1616
st = LuxCore.initialstates(rng, l)
1717
y1, _ = l(g, x, ps, st)
1818
loss = (x, ps) -> sum(first(l(g, x, ps, st)))
19-
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
19+
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
2020

2121
# Test with custom activation (relu)
2222
l_relu = TGCN(3=>3, act = relu)
@@ -28,46 +28,46 @@
2828
@test !isapprox(y1, y2, rtol=1.0f-2)
2929

3030
loss_relu = (x, ps) -> sum(first(l_relu(g, x, ps, st_relu)))
31-
test_gradients(loss_relu, x, ps_relu; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
31+
test_gradients(loss_relu, x, ps_relu; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
3232
end
3333

3434
@testset "A3TGCN" begin
3535
l = A3TGCN(3=>3)
3636
ps = LuxCore.initialparameters(rng, l)
3737
st = LuxCore.initialstates(rng, l)
3838
loss = (x, ps) -> sum(first(l(g, x, ps, st)))
39-
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
39+
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
4040
end
4141

4242
@testset "GConvGRU" begin
4343
l = GConvGRU(3=>3, 2)
4444
ps = LuxCore.initialparameters(rng, l)
4545
st = LuxCore.initialstates(rng, l)
4646
loss = (x, ps) -> sum(first(l(g, x, ps, st)))
47-
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
47+
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
4848
end
4949

5050
@testset "GConvLSTM" begin
5151
l = GConvLSTM(3=>3, 2)
5252
ps = LuxCore.initialparameters(rng, l)
5353
st = LuxCore.initialstates(rng, l)
5454
loss = (x, ps) -> sum(first(l(g, x, ps, st)))
55-
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
55+
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
5656
end
5757

5858
@testset "DCGRU" begin
5959
l = DCGRU(3=>3, 2)
6060
ps = LuxCore.initialparameters(rng, l)
6161
st = LuxCore.initialstates(rng, l)
6262
loss = (x, ps) -> sum(first(l(g, x, ps, st)))
63-
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
63+
test_gradients(loss, x, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
6464
end
6565

6666
@testset "EvolveGCNO" begin
6767
l = EvolveGCNO(3=>3)
6868
ps = LuxCore.initialparameters(rng, l)
6969
st = LuxCore.initialstates(rng, l)
7070
loss = (tx, ps) -> sum(sum(first(l(tg, tx, ps, st))))
71-
test_gradients(loss, tx, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoReverseDiff(), AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
71+
test_gradients(loss, tx, ps; atol=1.0f-2, rtol=1.0f-2, skip_backends=[AutoTracker(), AutoForwardDiff(), AutoEnzyme()])
7272
end
7373
end

0 commit comments

Comments
 (0)