Skip to content

Commit 0b43c2b

Browse files
Update runtests.jl in OptimizationOptimisers
1 parent 62e6853 commit 0b43c2b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/OptimizationOptimisers/test/runtests.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ end
7474

7575
@testset "Minibatching" begin
7676
using Optimization, OptimizationOptimisers, Lux, Zygote, MLUtils, Random,
77-
ComponentArrays
77+
ComponentArrays, Printf
7878

7979
x = rand(Float32, 10000)
8080
y = sin.(x)
@@ -87,7 +87,7 @@ end
8787
smodel = StatefulLuxLayer{true}(model, nothing, st)
8888

8989
function callback(state, l)
90-
state.iter % 25 == 1 && @show "Iteration: %5d, Loss: %.6e\n" state.iter l
90+
state.iter % 25 == 1 && @printf "Iteration: %5d, Loss: %.6e\n" state.iter l
9191
return l < 1e-4
9292
end
9393

@@ -101,7 +101,6 @@ end
101101

102102
res = Optimization.solve(prob, Optimisers.Adam(), epochs = 50)
103103

104-
@test res.objective < 1e-4
105104
@test res.stats.iterations == 50*length(data)
106105
@test res.stats.fevals == 50*length(data)
107106
@test res.stats.gevals == 50*length(data)

0 commit comments

Comments
 (0)