Skip to content

Commit

Permalink
Add set_learning_phase in TF backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Apr 14, 2016
1 parent cb5d69c commit 2cc9ebf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keras/backend/tensorflow_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def learning_phase():
return _LEARNING_PHASE


def set_learning_phase(value):
global _LEARNING_PHASE
_LEARNING_PHASE = tf.constant(value, name='keras_learning_phase')


def get_session():
'''Returns the TF session in use by the backend.
'''
Expand Down

0 comments on commit 2cc9ebf

Please sign in to comment.