class Sign

class Sign

Implementation of the elementwise sign function.

\[\begin{split} y = \left\{ \begin{array}{ll} 1 & (x > 0)\\ \alpha & (x = 0)\\ -1 & (x < 0) \end{array} \right. \end{split}\]
where the gradient is a `full` straight through, i.e., the gradient is not modified by this function. By default, \( \alpha \) = 1.0 .

Inputs:

  • N-D array.

Outputs:

  • N-D array.

Param alpha:

Value for x == 0.0