oneflow.nn.functional.hardswish

oneflow.nn.functional.hardswish(x: Tensor)Tensor

Applies the hardswish function, element-wise, as described in the paper:

Searching for MobileNetV3.

\[ext{Hardswish}(x) = egin{cases} 0 & ext{if~} x \le -3, \ x & ext{if~} x \ge +3, \ x \cdot (x + 3) /6 & ext{otherwise} \end{cases}\]

See Hardswish for more details.