Skip to content

Commit 963adba

Browse files
committed
Fix wrong results being reported as errors
1 parent e8b7944 commit 963adba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ elseif length(ARGS) == 3 && ARGS[1] == "--run"
4747
# If reached here - nothing went wrong
4848
@printf("%.3f", result.time_vs_primal)
4949
catch e
50-
if result.error isa ADIncorrectException
50+
if e isa ADIncorrectException
5151
# First check for completely incorrect ones
5252
for (a, b) in zip(result.grad_expected, result.grad_actual)
5353
if !isnan(a) && !isnan(b) && abs(a - b) > 1e-6

0 commit comments

Comments
 (0)