Sign - version 9#

This page documents version 9 of operator Sign. See Sign for the latest version (since version 13).

  • Domain: ai.onnx

  • Since version: 9

Calculate the sign of the given input tensor element-wise. If input > 0, output 1. if input < 0, output -1. if input == 0, output 0.

Inputs

  • input (T): Input tensor

Outputs

  • output (T): The sign of the input tensor computed element-wise. It has the same shape and type of the input.

Type Constraints

  • T: Constrain input and output types to all numeric tensors. Allowed types: tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8).