Autograd node for the Hard Sigmoid (Howard et al., MobileNetV3).
The derivative is the indicator of the active linear region , scaled by . Backward goes through the backend to share the piecewise kernel with the other hard-* activations.
Math
\qquad \frac{\partial y}{\partial x} = \begin{cases} 1/6, & -3 < x < 3 \\ 0, & \text{otherwise} \end{cases}$$Attributes
schema_v1OpSchema"hard_sigmoid", AmpPolicy::KeepInput.