drop_path¶
- dragon.nn.- drop_path(
 inputs,
 ratio=0.2,
 inplace=False,
 **kwargs
 )[source]¶
- Set the examples over the input to zero randomly. [Larsson et.al, 2016]. - The DropPath function is defined as: \[\text{DropPath}(x_{ij}) = x_{ij} * (r_{i} \sim \mathcal{B}(1, 1 - \text{ratio})) \]- Examples: - x = dragon.ones((5, 2), 'float32') print(dragon.nn.drop_path(x, ratio=0.5)) - Parameters:
- inputs (dragon.Tensor) – The input tensor.
- ratio (Union[float, dragon.Tensor], optional, default=0.2) – The probability to zero an example.
- inplace (bool, optional, default=False) – Call in-place or return a new tensor.
 
 - Returns:
- dragon.Tensor – The output tensor. 
 
