:nosearch: .. _op_ai_onnx_Elu-6: Elu - version 6 =============== This page documents version **6** of operator **Elu**. See :doc:`Elu` for the latest version (since version 22). - **Domain**: ``ai.onnx`` - **Since version**: 6 Elu takes one input data (Tensor ) and produces one output data (Tensor ) where the function ``f(x) = alpha * (exp(x) - 1.) for x = 0``., is applied to the tensor elementwise. **Inputs** - **X** (*T*): Input tensor **Outputs** - **Y** (*T*): Output tensor **Attributes** - **alpha** (*float*): Coefficient of ELU. **Type Constraints** - **T**: Constrain input and output types to float tensors. Allowed types: tensor(double), tensor(float), tensor(float16). Examples -------- **test_cc_elu** .. code-block:: text Node: Elu(X) -> (Y) Attributes: alpha = 2.0 .. code-block:: text Inputs: X: shape=(2, 3), dtype=float32 [[-2. , -1. , -0.5], [ 0.5, 1. , 2. ]] Outputs: Y: shape=(2, 3), dtype=float32 [[-1.7293295 , -1.2642411 , -0.78693867], [ 0.5 , 1. , 2. ]] **test_cc_elu_bfloat16** .. code-block:: text Node: Elu(X) -> (Y) Attributes: alpha = 1.0 .. code-block:: text Inputs: X: shape=(2, 3), dtype=bfloat16 [[-2, -1, -0.5], [0.5, 1, 2]] Outputs: Y: shape=(2, 3), dtype=bfloat16 [[-0.863281, -0.632812, -0.392578], [0.5, 1, 2]] **test_cc_elu_default** .. code-block:: text Node: Elu(X) -> (Y) .. code-block:: text Inputs: X: shape=(2, 3), dtype=float32 [[-2. , -1. , -0.5], [ 0.5, 1. , 2. ]] Outputs: Y: shape=(2, 3), dtype=float32 [[-0.86466473, -0.63212055, -0.39346933], [ 0.5 , 1. , 2. ]] **test_cc_elu_example** .. code-block:: text Node: Elu(X) -> (Y) Attributes: alpha = 2.0 .. code-block:: text Inputs: X: shape=(3,), dtype=float32 [-1., 0., 1.] Outputs: Y: shape=(3,), dtype=float32 [-1.2642411, 0. , 1. ] **test_cc_elu_float16** .. code-block:: text Node: Elu(X) -> (Y) Attributes: alpha = 2.0 .. code-block:: text Inputs: X: shape=(2, 3), dtype=float16 [[-2. , -1. , -0.5], [ 0.5, 1. , 2. ]] Outputs: Y: shape=(2, 3), dtype=float16 [[-1.7295, -1.265 , -0.787 ], [ 0.5 , 1. , 2. ]] Differences with previous version (1) ------------------------------------- **SchemaDiff**: ``Elu`` (domain ``'ai.onnx'``) * old version: 1 * new version: 6 * breaking: no