mlx.nn.Dropout

目錄

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.

參數:

p (float) -- The probability to zero an element

方法