Keeps each unit with probability p and rescales survivors by 1/p, so
the expected activation is unchanged and inference needs no adjustment –
training = FALSE is exactly the identity. Note p is the KEEP
probability, following Srivastava et al.; libraries that take the drop
probability instead will scale every activation by p^2 if the two
conventions are mixed.
References
Srivastava, N., et al. (2014). Dropout: A simple way to prevent neural networks from overfitting. JMLR 15, 1929-1958.
Examples
sort(unique(round(as.numeric(morie_esl_dropout(matrix(1, 20, 5), p = 0.5)$output), 6)))
#> [1] 0 2
