网友晒偷拍的伊能静丑照 没想到被本尊回复了……

paddle.nn.functional. softplus ( x: Tensor, beta: float = 1, threshold: float = 20, name: str | None = None ) Tensor [source]
百度 问球员:决赛对阵乌拉圭有什么样的期待?答:我们队伍是一直非常有竞争力的队伍,同时我们也观看了乌拉圭对阵捷克的比赛,发现乌拉圭非常的强劲,我想说的是球员在场上要做出正确的决定,我们代表威尔士,不管面对什么样的情况都要努力去赢,举起最终的奖杯,并且我认为每个人都尽最大的努力投入比赛,球队就有比较大的希望取胜。

softplus activation

\[\begin{split}softplus(x)=\begin{cases} \frac{1}{\beta} * \log(1 + e^{\beta * x}),&x\leqslant\frac{\varepsilon}{\beta};\\ x,&x>\frac{\varepsilon}{\beta}. \end{cases}\end{split}\]
Parameters
  • x (Tensor) – The input Tensor with data type float32, float64, complex64, complex128.

  • beta (float, optional) – The value of \(\beta\) for softplus. Default is 1

  • threshold (float, optional) – The value of \(\varepsilon\) for softplus. Default is 20

  • name (str|None, optional) – For details, please refer to Name. Generally, no setting is required. Default: None.

Returns

A Tensor with the same data type and shape as x .

Examples

>>> import paddle
>>> import paddle.nn.functional as F

>>> x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3], dtype='float32')
>>> out = F.softplus(x)
>>> print(out)
Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True,
[0.51301527, 0.59813893, 0.74439669, 0.85435522])