drop_path

dragon.nn.drop_path(
  inputs,
  prob=0.2,
  increment=0.0,
  **kwargs
)[source]

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

The DropPath function is defined as:

\[\text{DropPath}(x) = x * \text{Bernoulli}(p=1 - prob) \]

Set the increment to schedule prob from 0.0 after each run.

Parameters:
  • inputs (dragon.Tensor) – The input tensor.
  • prob (Union[float, dragon.Tensor], optional, default=0.2) – The dropping prob.
  • increment (float, optional, default=0.0) – The increment prob.
Returns:

dragon.Tensor – The output tensor.