未验证 提交 d48a20eb 编写于 作者: W wangchaochaohu 提交者: GitHub

fix reciprocal doc spec (#1224)

* fix reciprocal doc spec test=develop

* fix doc test=develop

* fix according reviewer advice test=develop

* fix according the review advice test=develop

* fix according the review advice test=develop
上级 ff8ecb08
......@@ -5,7 +5,7 @@ reciprocal
.. py:function:: paddle.fluid.layers.reciprocal(x, name=None)
Reciprocal(取倒数)激活函
reciprocal 对输入Tensor取倒
.. math::
......@@ -13,18 +13,19 @@ Reciprocal(取倒数)激活函数
参数:
- **x** - reciprocal算子的输入
- **use_cudnn** (BOOLEAN) – (bool,默认为false)是否仅用于cudnn核,需要安装cudnn
- **x** - 输入的多维Tensor,支持的数据类型为float32,float64。
- **name** (str,可选) – 该参数供开发人员打印调试信息时使用,具体用法请参见 :ref:`api_guide_Name` ,默认值为None。
返回: Reciprocal算子的输出。
返回: 对输入取倒数得到的Tensor,输出Tensor数据类型和维度与输入相同。
**代码示例**:
.. code-block:: python
import paddle.fluid as fluid
data = fluid.layers.data(name="input", shape=[32, 784])
result = fluid.layers.reciprocal(data)
data = fluid.layers.fill_constant(shape=[2], value=4, dtype='float32') #data=[4.0, 4.0]
result = fluid.layers.reciprocal(data) # result=[0.25, 0.25]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册