# tf.keras.layers.Dropout

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Dropout) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/layers/core.py#L110-L179) |

Applies Dropout to the input.

Inherits From: [`Layer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/layers/Layer)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.layers.Dropout`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Dropout), \`tf.compat.v2.keras.layers.Dropout\`

<br />

    tf.keras.layers.Dropout(
        rate, noise_shape=None, seed=None, **kwargs
    )

Dropout consists in randomly setting
a fraction `rate` of input units to 0 at each update during training time,
which helps prevent overfitting.

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `rate` | Float between 0 and 1. Fraction of the input units to drop. |
| `noise_shape` | 1D integer tensor representing the shape of the binary dropout mask that will be multiplied with the input. For instance, if your inputs have shape `(batch_size, timesteps, features)` and you want the dropout mask to be the same for all timesteps, you can use `noise_shape=(batch_size, 1, features)`. |
| `seed` | A Python integer to use as random seed. |

<br />

#### Call arguments:

- **`inputs`**: Input tensor (of any rank).
- **`training`**: Python boolean indicating whether the layer should behave in training mode (adding dropout) or in inference mode (doing nothing).