Check the docstring:

  

      github.com
  

  
    keras-team/keras/blob/master/keras/layers/core/dropout.py#L29:L32



      
      
          from keras.engine import base_layer
          from keras.utils import control_flow_util
          import tensorflow.compat.v2 as tf
          from tensorflow.python.util.tf_export import keras_export
          
          
          @keras_export('keras.layers.Dropout')
          class Dropout(base_layer.BaseRandomLayer):
            """Applies Dropout to the input.
          
            The Dropout layer randomly sets input units to 0 with a frequency of `rate`
            at each step during training time, which helps prevent overfitting.
            Inputs not set to 0 are scaled up by 1/(1 - rate) such that the sum over
            all inputs is unchanged.
          
            Note that the Dropout layer only applies when `training` is set to True
            such that no values are dropped during inference. When using `model.fit`,
            `training` will be appropriately set to True automatically, and in other
            contexts, you can set the kwarg explicitly to True when calling the layer.
          
            (This is in contrast to setting `trainable=False` for a Dropout layer.