Keras - Dropout Layers

Dropout is one of the important concept in the machine learning. It is used to fix the over-fitting issue. Input data may have some of the unwanted data, usually called as Noise. Dropout will try to remove the noise data and thus prevent the model from over-fitting.

Dropout has three arguments and they are as follows −

keras.layers.Dropout(rate, noise_shape = None, seed = None)
  • rate − represent the fraction of the input unit to be dropped. It will be from 0 to 1.

  • noise_shape represent the dimension of the shape in which the dropout to be applied. For example, the input shape is (batch_size, timesteps, features). Then, to apply dropout in the timesteps, (batch_size, 1, features) need to be specified as noise_shape

  • seed − random seed.