oneflow.nn.functional.hardsigmoid

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

Applies the element-wise function

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

See Hardsigmoid for more details.