Commit d016cb02 authored by Suharsh Sivakumar's avatar Suharsh Sivakumar Committed by TensorFlower Gardener
Browse files

Fix c++ gradients issue where multiple dependent outputs result in incorrect answer.

The issue is that we incorrectly calculate the pending num_expected_backprops for outputs nodes when one output transitively depends on another. this is because we use output nodes as an indicator of when we need to end our traversal. Instead we should only use output nodes that don't transitively get consumed by other output nodes as end indicators for our traversal. This change implements that fix.

Fixes #13190

PiperOrigin-RevId: 170971937
parent f9f037c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment