class Hard

class Hard

Hard Sigmoid defined as.

\[\begin{split} y_i = 1 \text{ if } x_i > 2.5\\ y_i = 0 \text{ if } x_i < -2.5\\ y_i = 0.2 * x_i + 0.5 \text{, otherwise}. \end{split}\]

Inputs:

  • N-D array.

Outputs:

  • N-D array.

Template Parameters:

T – Data type for computation.