diff --git a/test/neural_ode_mm_tests.jl b/test/neural_ode_mm_tests.jl index 964ea42e9..3e437ac9c 100644 --- a/test/neural_ode_mm_tests.jl +++ b/test/neural_ode_mm_tests.jl @@ -46,5 +46,5 @@ optprob = Optimization.OptimizationProblem(optfunc, p) res = Optimization.solve( optprob, BFGS(; initial_stepnorm = 0.001); callback = cb, maxiters = 100) - @test res.minimum < l1 + @test res.objective < l1 end diff --git a/test/newton_neural_ode_tests.jl b/test/newton_neural_ode_tests.jl index 62e429237..414ccca77 100644 --- a/test/newton_neural_ode_tests.jl +++ b/test/newton_neural_ode_tests.jl @@ -27,7 +27,7 @@ # KrylovTrustRegion is hardcoded to use `Array` psd, psax = getdata(ps), getaxes(ps) - loss_function(θ) = sum(abs2, y .- stnODE(x, ComponentArray(θ, psax))[end]) + loss_function(θ) = sum(abs2, y .- stnODE(x, ComponentArray(θ, psax)).u[end]) l1 = loss_function(psd) optf = Optimization.OptimizationFunction( (x, p) -> loss_function(x), Optimization.AutoZygote())