Celu - version 12#
This page documents version 12 of operator Celu. See Celu for the latest version (since version 28).
Domain:
ai.onnxSince version: 12
Continuously Differentiable Exponential Linear Units: Perform the linear unit element-wise on the input tensor X using formula:
max(0,x) + min(0,alpha*(exp(x/alpha)-1))
Inputs
X (T): Input tensor
Outputs
Y (T): Output tensor
Attributes
alpha (float): The Alpha value in Celu formula which control the shape of the unit. The default value is 1.0.
Type Constraints
T: Constrain input and output types to float32 tensors. Allowed types: tensor(float).
Examples#
test_cc_celu
Node:
Celu(X) -> (Y)
Attributes:
alpha = 2.0
Inputs:
X: shape=(2, 3), dtype=float32
[[-3., -1., 0.],
[ 1., 2., 3.]]
Outputs:
Y: shape=(2, 3), dtype=float32
[[-1.5537397 , -0.78693867, 0. ],
[ 1. , 2. , 3. ]]
test_cc_celu_default
Node:
Celu(X) -> (Y)
Inputs:
X: shape=(2, 3), dtype=float32
[[-3., -1., 0.],
[ 1., 2., 3.]]
Outputs:
Y: shape=(2, 3), dtype=float32
[[-0.95021296, -0.63212055, 0. ],
[ 1. , 2. , 3. ]]