Factors the IR calc into a helper that is used for both the output an intermediate layers.
Behavior should be identical to before, except:
we now return non-none C_pinv and W_pinv for final layer (when rotating final layer). This is needed for ablations and occasionally helpful other places.
memory footprint of RIB should be smaller. See #300
Related Issue
Closes #300
How Has This Been Tested?
All tests from before pass.
Does this PR introduce a breaking change?
No. Some things are possible that previously were not (eg running centered_rib_test on the last rotated layer)
Helper for IR calc
Description
Factors the IR calc into a helper that is used for both the output an intermediate layers.
Behavior should be identical to before, except:
Related Issue
Closes #300
How Has This Been Tested?
All tests from before pass.
Does this PR introduce a breaking change?
No. Some things are possible that previously were not (eg running
centered_rib_test
on the last rotated layer)