thresholded_relu_cn.rst 687 字节
Newer Older
H
Hao Wang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
.. _cn_api_fluid_layers_thresholded_relu:

thresholded_relu
-------------------------------

.. py:function:: paddle.fluid.layers.thresholded_relu(x,threshold=None)

ThresholdedRelu激活函数

.. math::

  out = \left\{\begin{matrix}
      x, &if x > threshold\\
      0, &otherwise
      \end{matrix}\right.

参数:
- **x** -ThresholdedRelu激活函数的输入
- **threshold** (FLOAT)-激活函数threshold的位置。[默认1.0]。

返回:ThresholdedRelu激活函数的输出

**代码示例**:

.. code-block:: python

  import paddle.fluid as fluid
  data = fluid.layers.data(name="input", shape=[1])
  result = fluid.layers.thresholded_relu(data, threshold=0.4)