tf.keras.ops.celu
Stay organized with collections
Save and categorize content based on your preferences.
Continuously-differentiable exponential linear unit.
tf.keras.ops.celu(
x, alpha=1.0
)
It is defined as:
f(x) = alpha * (exp(x / alpha) - 1) for x < 0, f(x) = x for x >= 0.
Args |
x
|
Input tensor.
|
alpha
|
the α value for the CELU formulation. Defaults to 1.0.
|
Returns |
A tensor with the same shape as x.
|
Example:
x = np.array([-1., 0., 1.])
x_celu = keras.ops.celu(x)
print(x_celu)
array([-0.63212056, 0. , 1. ], shape=(3,), dtype=float64)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2026-10-31 UTC.
[null,null,["Last updated 2026-10-31 UTC."],[],[]]