# tf.contrib.nn.alpha_dropout

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/nn/python/ops/alpha_dropout.py#L29-L85) |

Computes alpha dropout.

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

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](https://arxiv.org/abs/1706.02515)

<br />

<br />

<br />

| ## 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.compat.v1.set_random_seed`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/random/set_random_seed) for behavior. |
| `name` | A name for this operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A Tensor of the same shape of `x`. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If `keep_prob` is not in `(0, 1]`. |

<br />