We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bff5bc commit b263ac4Copy full SHA for b263ac4
1 file changed
src/common/defaults.jl
@@ -15,7 +15,7 @@ defaulttol(x::Any) = eps(real(float(one(eltype(x)))))^(2 / 3)
15
Default tolerance for deciding to warn if incoming adjoints of a pullback rule
16
has components that are not gauge-invariant.
17
"""
18
-default_pullback_gauge_atol(A) = eps(norm(A, Inf))^(3 / 4)
+default_pullback_gauge_atol(A) = iszerotangent(A) ? 0 : eps(norm(A, Inf))^(3 / 4)
19
default_pullback_gauge_atol(A, As...) = maximum(default_pullback_gauge_atol, (A, As...))
20
21
0 commit comments