W3cubDocs

/TensorFlow Python

tf.keras.backend.dropout

tf.keras.backend.dropout(
    x,
    level,
    noise_shape=None,
    seed=None
)

Defined in tensorflow/python/keras/_impl/keras/backend.py.

Sets entries in x to zero at random, while scaling the entire tensor.

Arguments:

  • x: tensor
  • level: fraction of the entries in the tensor that will be set to 0.
  • noise_shape: shape for randomly generated keep/drop flags, must be broadcastable to the shape of x
  • seed: random seed to ensure determinism.

Returns:

A tensor.

© 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/keras/backend/dropout