def in_train_phase(x, alt):
 if (learning_phase() is 1):
  return x
 elif (learning_phase() is 0):
  return alt
 x = switch(learning_phase(), x, alt)
 x._uses_learning_phase = True
 return x

def in_train_phase ( x , alt ) : if ( learning_phase ( ) is 1 ) : return x elif ( learning_phase ( ) is 0 ) : return alt x = switch ( learning_phase ( ) , x , alt ) x . _uses_learning_phase = True return x
selects x in train phase .