may help numerical tests
This commit is contained in:
parent
d22270050c
commit
4035745f6e
|
@ -19,4 +19,6 @@ function ngradient(f, xs::AbstractArray...)
|
|||
return grads
|
||||
end
|
||||
|
||||
gradcheck(f, xs...) = all(isapprox.(ngradient(f, xs...), gradient(f, xs...), rtol = 1e-5))
|
||||
gradcheck(f, xs...) =
|
||||
all(isapprox.(ngradient(f, xs...),
|
||||
gradient(f, xs...), rtol = 1e-5, atol = 1e-5))
|
||||
|
|
Loading…
Reference in New Issue