Introduce API `keras.backend.learning_phase_scope(value)` (internal for now).
authorFrancois Chollet <fchollet@google.com>
Tue, 6 Mar 2018 22:59:21 +0000 (14:59 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 6 Mar 2018 23:03:23 +0000 (15:03 -0800)
commitcebb7fc9a406061ff3eea3fe6e2219197265d1d5
tree057456a624b9db962569dd14074434178a0dbc5d
parent86919effa2c1bfb36d0a3accbbbcd1727bf25cb1
Introduce API `keras.backend.learning_phase_scope(value)` (internal for now).
Primary goal is to avoid side effects when setting the learning phase in eager training.

PiperOrigin-RevId: 188086280
tensorflow/python/framework/smart_cond.py
tensorflow/python/keras/_impl/keras/backend.py
tensorflow/python/keras/_impl/keras/backend_test.py
tensorflow/python/keras/_impl/keras/engine/training_eager.py