|View source on GitHub|
Applies Dropout to the input.
Compat aliases for migration
See Migration guide for more details.
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.
| ||Float between 0 and 1. Fraction of the input units to drop.|
| || 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 |
| ||A Python integer to use as random seed.|
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).
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.