Skip to content

Commit 883a392

Browse files
committed
Fix residual
1 parent 894294a commit 883a392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/nonlinear_least_squares.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ y_target = true_function(x, θ_true)
1212

1313
function loss_function(θ, p)
1414
= true_function(p, θ)
15-
return abs2.(.- y_target)
15+
return.- y_target
1616
end
1717

1818
function loss_function(resid, θ, p)
1919
true_function(resid, p, θ)
20-
resid .= abs2.(resid .- y_target)
20+
resid .= resid .- y_target
2121
return resid
2222
end
2323

0 commit comments

Comments
 (0)