hardswish¶
- dragon.vm.torch.nn.functional.- hardswish(input)[source]¶
- Apply the hard swish function to input. [Howard et.al, 2019]. - The HardSwish function is defined as: \[\text{Hardsigmoid}(x) = \begin{cases} 0 & \text{if~} x \le -3, \\ x & \text{if~} x \ge +3, \\ x \cdot (x + 3) /6 & \text{otherwise} \end{cases} \]- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
 
 - Returns:
- dragon.vm.torch.Tensor – The output tensor. 
 - See also 
