ngraph.opset5.sign

ngraph.opset5.sign(node: Union[_pyngraph.Node, int, float, numpy.ndarray], name: Optional[str] = None) _pyngraph.Node

Perform element-wise sign operation.

Parameters
  • node – One of: input node, array or scalar.

  • name – The optional new name for output node.

Returns

The node with mapped elements of the input tensor to -1 (if it is negative), 0 (if it is zero), or 1 (if it is positive).