@staticmethod
def dropout(in_tensor, keep_prob, evaluation):
    ' Dropout: Each neuron is dropped independently. '
    with tf.variable_scope('dropout'):
        tensor_shape = in_tensor.get_shape().as_list()
        out_tensor = tf.cond(evaluation, (lambda : tf.nn.dropout(in_tensor, 1.0, noise_shape=tensor_shape)), (lambda : tf.nn.dropout(in_tensor, keep_prob, noise_shape=tensor_shape)))
        return out_tensor
Dropout: Each neuron is dropped independently.
@staticmethod
def dropout(in_tensor, keep_prob, evaluation):
    '  '
    with tf.variable_scope('dropout'):
        tensor_shape = in_tensor.get_shape().as_list()
        out_tensor = tf.cond(evaluation, (lambda : tf.nn.dropout(in_tensor, 1.0, noise_shape=tensor_shape)), (lambda : tf.nn.dropout(in_tensor, keep_prob, noise_shape=tensor_shape)))
        return out_tensor