From 858299777eaf95b27e7dbaa249a729fb2a4fc1ac Mon Sep 17 00:00:00 2001 From: hong19860320 <9973393+hong19860320@users.noreply.github.com> Date: Wed, 25 Sep 2019 13:31:06 +0800 Subject: [PATCH] update cn doc for floor op (#1337) * update cn doc for floor op * refine the description of floor op --- doc/fluid/api_cn/layers_cn/floor_cn.rst | 30 +++++++++---------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/doc/fluid/api_cn/layers_cn/floor_cn.rst b/doc/fluid/api_cn/layers_cn/floor_cn.rst index 2e2d3a12e..89e93ad2b 100644 --- a/doc/fluid/api_cn/layers_cn/floor_cn.rst +++ b/doc/fluid/api_cn/layers_cn/floor_cn.rst @@ -5,35 +5,25 @@ floor .. py:function:: paddle.fluid.layers.floor(x, name=None) - -向下取整运算激活函数。 +向下取整函数。 .. math:: out = \left \lfloor x \right \rfloor +参数: + - **x** - 该OP的输入为多维Tensor。数据类型必须为float32或float64。 + - **name** (str, 可选) - 该参数供开发人员打印调试信息时使用,具体用法请参见 :ref:`api_guide_Name`,默认值为None。 -参数: - - - **x** - Floor算子的输入 - - **use_cudnn** (BOOLEAN) – (bool,默认为false)是否仅用于cudnn核,需要安装cudnn +返回:输出为Tensor,与 ``x`` 维度相同、数据类型相同。 - -返回: Floor算子的输出。 +返回类型:Variable **代码示例**: .. code-block:: python import paddle.fluid as fluid - data = fluid.layers.data(name="input", shape=[32, 784]) - result = fluid.layers.floor(data) - - - - - - - - - - + data1 = fluid.layers.fill_constant(shape=[3, 2], value=2.5, dtype='float32') # [[2.5, 2.5], [2.5, 2.5], [2.5, 2.5]] + data2 = fluid.layers.fill_constant(shape=[2, 3], value=-2.5, dtype='float64') # [[-2.5, -2.5, -2.5], [-2.5, -2.5, -2.5]] + result1 = fluid.layers.floor(data1) # [[2., 2.], [2., 2.], [2., 2.]] + result2 = fluid.layers.floor(data2) # [[-3., -3., -3.], [-3., -3., -3.]] -- GitLab