Skip to content

Commit 98b9af0

Browse files
committed
More fixes
1 parent 963adba commit 98b9af0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ elseif length(ARGS) == 3 && ARGS[1] == "--run"
4949
catch e
5050
if e isa ADIncorrectException
5151
# First check for completely incorrect ones
52-
for (a, b) in zip(result.grad_expected, result.grad_actual)
52+
for (a, b) in zip(e.grad_expected, e.grad_actual)
5353
if !isnan(a) && !isnan(b) && abs(a - b) > 1e-6
5454
println("wrong")
5555
exit()
5656
end
5757
end
5858
# If not, check for NaN's and report those
59-
if any(isnan, result.grad_expected) || any(isnan, result.grad_actual)
59+
if any(isnan, e.grad_expected) || any(isnan, e.grad_actual)
6060
println("NaN")
6161
else
6262
# Something else went wrong, shouldn't happen

0 commit comments

Comments
 (0)