Skip to content

Commit

Permalink
chore: pick u0 correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaLGandhi committed May 26, 2024
1 parent 69f217d commit df65237
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backsolve_adjoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ end
Please use the higher level `solve` interface or specify these two contributions.")

p = parameter_values(sol)
u0 = state_values(sol)
u0 = state_values(sol, 1)
tunables, repack, _ = canonicalize(Tunable(), p)

## Force recompile mode until vjps are specialized to handle this!!!
Expand All @@ -152,7 +152,7 @@ end
terminated = false
if hasfield(typeof(sol), :retcode)
if sol.retcode == ReturnCode.Terminated
tspan = (tspan[1], current_time(sol)[end])
tspan = (tspan[1], last(current_time(sol)))
terminated = true
end
end
Expand Down

0 comments on commit df65237

Please sign in to comment.