(l-onnx-doc-Softsign)= # Softsign (l-onnx-op-softsign-22)= ## Softsign - 22 ### Version - **name**: [Softsign (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Softsign) - **domain**: `main` - **since_version**: `22` - **function**: `True` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 22**. ### Summary Calculates the softsign (x/(1+|x|)) of the given input tensor element-wise. #### Function Body The function definition for this operator. ``` < domain: "", opset_import: ["" : 18] > Softsign (input) => (output) { One = Constant () OneCast = CastLike (One, input) AbsInput = Abs (input) OneAddAbsInput = Add (OneCast, AbsInput) output = Div (input, OneAddAbsInput) } ``` ### Inputs - **input** (heterogeneous) - **T**: Input tensor ### Outputs - **output** (heterogeneous) - **T**: The softsign (x/(1+|x|)) values of the input tensor computed element-wise ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input and output types to float tensors. ```{toctree} text_diff_Softsign_1_22 ``` (l-onnx-op-softsign-1)= ## Softsign - 1 ### Version - **name**: [Softsign (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Softsign) - **domain**: `main` - **since_version**: `1` - **function**: `True` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 1**. ### Summary Calculates the softsign (x/(1+|x|)) of the given input tensor element-wise. #### Function Body The function definition for this operator. ``` < domain: "", opset_import: ["" : 18] > Softsign (input) => (output) { One = Constant () OneCast = CastLike (One, input) AbsInput = Abs (input) OneAddAbsInput = Add (OneCast, AbsInput) output = Div (input, OneAddAbsInput) } ``` ### Inputs - **input** (heterogeneous) - **T**: Input tensor ### Outputs - **output** (heterogeneous) - **T**: The softsign (x/(1+|x|)) values of the input tensor computed element-wise ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input and output types to float tensors.