mlx.nn.Dropout#
- class 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
Methods