def dropout(input_layer, keep_prob, phase=Phase.train, name=PROVIDED):
  """Aplies dropout if this is in the train phase."""
  if phase == Phase.train:
    return tf.nn.dropout(input_layer, keep_prob, name=name)
  else:
    return input_layer
def dropout ( input_layer , keep_prob , phase = Phase . train , name = PROVIDED ) : if phase == Phase . train : return tf . nn . dropout ( input_layer , keep_prob , name = name ) else : return input_layer
Aplies dropout if this is in the train phase.