drop_path

dragon.vm.torch.nn.functional.drop_path(
  input,
  p=0.2,
  increment=0.0,
  training=True,
  inplace=False,
  slot=None
)[source]

Set the examples over input to zero randomly. [Larsson et.al, 2016].

The DropPath function is defined as:

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

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