def set_learning_phase(value):
 global _GRAPH_LEARNING_PHASES
 if (value not in {0, 1}):
  raise ValueError('Expected learning phase to be 0 or 1.')
 _GRAPH_LEARNING_PHASES[tf.get_default_graph()] = value

def set_learning_phase ( value ) : global _GRAPH_LEARNING_PHASES if ( value not in { 0 , 1 } ) : raise ValueError ( 'Expected learning phase to be 0 or 1.' ) _GRAPH_LEARNING_PHASES [ tf . get_default_graph ( ) ] = value
sets the learning phase to a fixed value .