(inputs, is_training, scope, keep_prob=0.5, noise_shape=None)
Dropout layer.

  Args:
    inputs: tensor
    is_training: boolean tf.Variable
    scope: string
    keep_prob: float in [0,1]
    noise_shape: list of ints

  Returns:
    tensor variable
Dropout layer.
Dropout layer .
def dropout(inputs, is_training, scope, keep_prob=0.5, noise_shape=None):
    """ Dropout layer.

  Args:
    inputs: tensor
    is_training: boolean tf.Variable
    scope: string
    keep_prob: float in [0,1]
    noise_shape: list of ints

  Returns:
    tensor variable
  """
    with tf.variable_scope(scope) as sc:
        outputs = tf.cond(
            is_training,
            lambda: tf.nn.dropout(inputs, keep_prob, noise_shape),
            lambda: inputs,
        )
        return outputs
def dropout ( inputs , is_training , scope , keep_prob = 0.5 , noise_shape = None ) : with tf . variable_scope ( scope ) as sc : outputs = tf . cond ( is_training , lambda : tf . nn . dropout ( inputs , keep_prob , noise_shape ) , lambda : inputs , ) return outputs