You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sum rrule relies on broadcasting to figure out the
result shape of the cotangent. However, this has two
disadvantages:
1. We need to keep the original array around
2. Broadcasting machinery is complicated and tough on (higher-order) AD
This adds a special case for `dims=:`, which simply stores
the dimensions of the original array and uses `fill`
in the pullback, which has a simple rrule and is thus
much easier to AD.
0 commit comments