# mlx.nn.Dropout — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.nn.Dropout

class mlx.nn.Dropout(p: float = 0.5)

  Randomly zero a portion of the elements during training.

  The remaining elements are multiplied with \(\frac{1}{1-p}\) where \(p\) is the probability of zeroing an element. This is done so the expected value of a given element will remain the same.

  Parameters:

    p (float) – The probability to zero an element