Dropout¶
- class dragon.vm.torch.nn.Dropout(
 p=0.5,
 inplace=False
 )[source]¶
- Set the elements to zero randomly. [Srivastava et.al, 2014]. - The Dropout function is defined as: \[\text{Dropout}(x) = x * (r \sim \mathcal{B}(1, 1 - p)) \]- Examples: - # Dropout is enabled if the module is at ``training`` m = torch.nn.Dropout(p=0.5, inplace=True) x = torch.ones(2, 3) y = m(x) # Nothing will happen if it set to ``evaluating`` m.eval() z = m(x) - See also 
