dropout

dragon.vm.torch.nn.functional.dropout(
  input,
  p=0.5,
  training=True,
  inplace=False
)[source]

Set the elements of the input to zero randomly. [Srivastava et.al, 2014].

The Dropout function is defined as:

\[\text{Dropout}(x) = x * \text{Bernoulli}(p=1 - prob) \]
Parameters:
  • input (dragon.vm.torch.Tensor) – The input tensor.
  • p (float, optional, default=0.5) – The dropping prob.
  • training (bool, optional, default=True) – The training flag.
  • inplace (bool, optional, default=False) – Whether to do the operation in-place.
Returns:

dragon.vm.torch.Tensor – The output tensor.