From 3cb7bd2263e25fb4e01248eb89d9fb88ca07b8d2 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 2 Aug 2024 23:01:40 -0400 Subject: [PATCH] fix some depwarns --- test/neural_ode_mm_tests.jl | 2 +- test/newton_neural_ode_tests.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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())