Skip to content

Commit c01ab6f

Browse files
authored
Update train.jl
1 parent c07bea9 commit c01ab6f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/train.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ end
4040
end
4141

4242
for (trainfn!, name) in ((Flux.train!, "Zygote"), (train_enzyme!, "Enzyme"))
43-
@eval begin
4443
@testset "Explicit Flux.train! features with $name" begin
4544
@testset "Stop on NaN" begin
4645
m1 = Dense(1 => 1)
4746
m1.weight .= 0
4847
CNT = 0
49-
@test_throws DomainError Flux.trainfn!(m1, tuple.(1:100), Descent(0.1)) do m, i
48+
@test_throws DomainError trainfn!(m1, tuple.(1:100), Descent(0.1)) do m, i
5049
CNT += 1
5150
(i == 51 ? NaN32 : 1f0) * sum(m([1.0]))
5251
end
@@ -71,7 +70,6 @@ for (trainfn!, name) in ((Flux.train!, "Zygote"), (train_enzyme!, "Enzyme"))
7170
end
7271
end
7372
end
74-
end
7573

7674
@testset "Explicit Flux.update! features" begin
7775
m = Chain(Dense(2=>3, tanh), Dense(3=>1), only)

0 commit comments

Comments
 (0)