softplus_cn.rst 595 字节
Newer Older
H
Hao Wang 已提交
1 2 3 4 5 6 7
.. _cn_api_fluid_layers_softplus:

softplus
-------------------------------

.. py:function:: paddle.fluid.layers.softplus(x,name=None)

8
softplus激活函数
H
Hao Wang 已提交
9 10 11 12 13

.. math::
    out = \ln(1 + e^{x})

参数:
14 15
    - **x** (Variable) - 张量(Tensor)
    - **name** (str|None) - 该层名称(可选)。若设为None,则自动为该层命名。
H
Hao Wang 已提交
16

17 18 19
返回: 张量(Tensor)

返回类型: 变量(Variable)
H
Hao Wang 已提交
20 21 22 23 24

**代码示例**:

.. code-block:: python

25 26 27
    import paddle.fluid as fluid
    data = fluid.layers.data(name="input", shape=[32, 784])
    result = fluid.layers.softplus(data)
H
Hao Wang 已提交
28 29 30 31 32 33 34 35 36 37 38