Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/OptimizationOptimisers/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ end

@testset "Minibatching" begin
using Optimization, OptimizationOptimisers, Lux, Zygote, MLUtils, Random,
ComponentArrays
ComponentArrays, Printf

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

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

Expand All @@ -101,7 +101,6 @@ end

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

@test res.objective < 1e-4
@test res.stats.iterations == 50*length(data)
@test res.stats.fevals == 50*length(data)
@test res.stats.gevals == 50*length(data)
Expand Down
Loading