File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11"""
22 AbstractZero <: AbstractDifferential
33
4- This abstract type encompasses zero-like differential types.
4+ Supertype of zero-like differentials—i.e., differentials that act like zero when
5+ added or multiplied to other values.
56If an AD system encounters a propagator that takes as input only subtypes of `AbstractZero`,
67then it can stop performing AD operations. All propagators are linear functions, and thus
78the final result will be zero.
@@ -50,7 +51,8 @@ The only valid way to perturb such values is to not change them at all.
5051As a consequence, `DoesNotExist` is functionally identical to `Zero()`,
5152but it provides additional semantic information.
5253
53- If you are adding this differential to a primal, then something is wrong.
54+ Adding this differential to a primal is intrinsically wrong: gradient-based
55+ methods cannot be used to optimize over discrete variables.
5456An optimization package making use of this might want to check for such a case.
5557
5658!!! note:
You can’t perform that action at this time.
0 commit comments