From d3d0c514913bdbb8353f858ed43f2060a858384c Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 18 Nov 2024 17:47:46 -0100 Subject: [PATCH] Update complex_matrix_finitediff.jl --- test/complex_matrix_finitediff.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/complex_matrix_finitediff.jl b/test/complex_matrix_finitediff.jl index 4161d33eb..4f84b54cf 100644 --- a/test/complex_matrix_finitediff.jl +++ b/test/complex_matrix_finitediff.jl @@ -22,7 +22,7 @@ prob_ode = ODEProblem(f_nn, u0, tspan, ComponentArray(ip)); function loss_adjoint(p; sensealg = nothing) local prediction = solve( - prob_ode, BS5(), p = p, abstol = 1e-12, reltol = 1e-12, sensealg = sensealg) + prob_ode, BS5(), p = p, abstol = 1e-13, reltol = 1e-13, sensealg = sensealg) local usol = last(prediction) local loss = abs(1.0 - abs(tr(usol * utarget') / 2)) return loss @@ -35,5 +35,5 @@ dp3 = Zygote.gradient( x, sensealg = InterpolatingAdjoint(autodiff = false, autojacvec = false)), ComponentArray(ip)) -@test dp1[1]≈dp2 atol=1e-3 -@test dp1[1]≈dp3[1] atol=5e-3 +@test dp1[1]≈dp2 atol=1e-2 +@test dp1[1]≈dp3[1] atol=5e-2