Skip to content

Commit b182ae1

Browse files
Fix ForwardDiff overload for user vjp (#563)
1 parent c6e11ae commit b182ae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/NonlinearSolveBase/src/autodiff.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function nlls_generate_vjp_function(prob::NonlinearLeastSquaresProblem, sol, uu)
120120
if SciMLBase.isinplace(prob)
121121
return @closure (du, u, p) -> begin
122122
resid = Utils.safe_similar(du, length(sol.resid))
123-
prob.f.vjp(resid, u, p)
123+
prob.f(resid, u, p)
124124
prob.f.vjp(du, resid, u, p)
125125
du .*= 2
126126
return nothing

0 commit comments

Comments
 (0)