def clear_session():
 global _SESSION
 global _GRAPH_LEARNING_PHASES
 tf.reset_default_graph()
 reset_uids()
 _SESSION = None
 phase = tf.placeholder(dtype='bool', name='keras_learning_phase')
 _GRAPH_LEARNING_PHASES[tf.get_default_graph()] = phase

def clear_session ( ) : global _SESSION global _GRAPH_LEARNING_PHASES tf . reset_default_graph ( ) reset_uids ( ) _SESSION = None phase = tf . placeholder ( dtype = 'bool' , name = 'keras_learning_phase' ) _GRAPH_LEARNING_PHASES [ tf . get_default_graph ( ) ] = phase
removes values for the given session variables names if they exist .