Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1089: Fix broadcasting `-` with booleans r=mcabbott a=mcabbott Closes #1086 The issue is that `unbroadcast` collapses the gradient of a non-differentiable argument to `nothing`, Zygote's marker for such things, which the rule then tried to negate. (This is why CRC defines its own zero types for this purpose, instead of using nothing). I presume the original reason for `-unbroadcast(y, Δ)` not `unbroadcast(y, -Δ)` is to save an allocation when `y` is a scalar etc. I did not see any other cases where further operations are done after `unbroadcast`. Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com>
- Loading branch information