Commit 8234d5a3 authored by Priya Gupta's avatar Priya Gupta Committed by TensorFlower Gardener
Browse files

Keras learning phase scope bug fix.

This sequence of steps would result in unexpected behavior:
1. Start in eager mode.
2. Enter and exit a learning phase scope.
3. Enter the keras default graph scope and get the learning phase value.

In step #3, the value returned would be 0, instead of a placeholder, because the default value of 0 got set in the graph in step 2. In essence, learning phase scope is not resetting the states correctly when exiting.
This change fixes this by restoring things more accurately when existing a learning phase scope.

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