Commit 0137f7d2 authored by Skye Wanderman-Milne's avatar Skye Wanderman-Milne Committed by TensorFlower Gardener
Browse files

Fix control flow bug.

Without this change, the newly added test would fail with a "Reval[0]"
error. This was due to extra Enter nodes being added in the gradients
graph in order to enter the outer while contexts for a value that was
already in those contexts. The extra Enter nodes would cause the
frames of the execution to be messed up, which prevented the final
value from being propagated to the outermost Exit node.

A similar change is probably needed in WhileContext, although I don't
have a test case for this yet.

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