During training, randomly zeroes some of the elements of the input tensor with probability p using samples from a Bernoulli distribution. Each channel will be zeroed out independently on every forward call.
nn_dropout(p =0.5, inplace =FALSE)
Arguments
p: probability of an element to be zeroed. Default: 0.5
inplace: If set to TRUE, will do this operation in-place. Default: FALSE.
Furthermore, the outputs are scaled by a factor of :math:\frac{1}{1-p} during training. This means that during evaluation the module simply computes an identity function.