W3cubDocs

/TensorFlow Python

tf.contrib.nn.alpha_dropout

tf.contrib.nn.alpha_dropout(
    x,
    keep_prob,
    noise_shape=None,
    seed=None,
    name=None
)

Defined in tensorflow/contrib/nn/python/ops/alpha_dropout.py.

Computes alpha dropout.

Alpha Dropout is a dropout that maintains the self-normalizing property. For an input with zero mean and unit standard deviation, the output of Alpha Dropout maintains the original mean and standard deviation of the input.

See Self-Normalizing Neural Networks

Args:

  • x: A tensor.
  • keep_prob: A scalar Tensor with the same type as x. The probability that each element is kept.
  • noise_shape: A 1-D Tensor of type int32, representing the shape for randomly generated keep/drop flags.
  • seed: A Python integer. Used to create random seeds. See tf.set_random_seed for behavior.
  • name: A name for this operation (optional).

Returns:

A Tensor of the same shape of x.

Raises:

  • ValueError: If keep_prob is not in (0, 1].

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/nn/alpha_dropout