Skip to content

Commit

Permalink
add some sensealg options
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Aug 1, 2024
1 parent 9bf854f commit de43449
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/prob_kwargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end

function f2(a)
_prob = remake(prob, p = [a[1]], saveat = savetimes)
predicted = solve(_prob, Tsit5(), sensealg = ForwardDiffSensitivity(), abstol = 1e-12,
predicted = solve(_prob, Tsit5(), sensealg = InterpolatingAdjoint(), abstol = 1e-12,
reltol = 1e-12)
sum(predicted.u[end])
end
Expand Down Expand Up @@ -54,7 +54,10 @@ let callback_count1 = 0, callback_count2 = 0

@testset "Callback duplication check" begin
for adjoint_type in [
ForwardDiffSensitivity(), ReverseDiffAdjoint(), TrackerAdjoint()]
ForwardDiffSensitivity(), ReverseDiffAdjoint(), TrackerAdjoint(),
BacksolveAdjoint(), InterpolatingAdjoint(), QuadratureAdjoint()]
count1 = 0
count2 = 0
u0p = [2.0, 3.0]
Zygote.gradient(x -> f1(x, adjoint_type), u0p)
Zygote.gradient(x -> f2(x, adjoint_type), u0p)
Expand Down

0 comments on commit de43449

Please sign in to comment.