CELU¶
CELU激活层(CELU Activation Operator)
根据 Continuously Differentiable Exponential Linear Units 对输入Tensor中每个元素应用以下计算。
         \[CELU(x) = max(0, x) + min(0, \alpha * (e^{x/\alpha} − 1))\]
       
 
       其中,\(x\) 为输入的 Tensor
形状:¶
input: 任意形状的Tensor。
output: 和input具有相同形状的Tensor。
代码示例¶
import paddle
x = paddle.to_tensor([[-1. ,6.], [1., 15.6]])
m = paddle.nn.CELU(0.2)
out = m(x)
# [[-0.19865242,  6.        ],
#  [ 1.        , 15.60000038]]