提交 44d82178 编写于 作者: G GaoWei8 提交者: Kaipeng Deng

Fix ceil op doc (#1219)

* Fix ceil op doc
test=document_preview
上级 08a2ac0b
......@@ -5,7 +5,7 @@ ceil
.. py:function:: paddle.fluid.layers.ceil(x, name=None)
向上取整运算激活函数。
向上取整运算函数。
.. math::
out = \left \lceil x \right \rceil
......@@ -13,25 +13,24 @@ ceil
参数:
- **x** (Variable) - 该OP的输入为多维Tensor。数据类型为float32或float64。
- **name** (str, 可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为None。
- **x** - Ceil算子的输入
- **use_cudnn** (BOOLEAN) – (bool,默认为false)是否仅用于cudnn核,需要安装cudnn
返回: 输出为Tensor,与 ``x`` 维度相同、数据类型相同。
返回: Ceil算子的输出。
返回类型: Variable
**代码示例**:
.. code-block:: python
import paddle.fluid as fluid
data = fluid.layers.data(name="input", shape=[32, 784])
result = fluid.layers.ceil(data)
import paddle.fluid as fluid
import numpy as np
input_ceil = np.array([[-1.5,6],[1,15.6]])
with fluid.dygraph.guard():
x = fluid.dygraph.to_variable(input_ceil)
y = fluid.layers.ceil(x)
print(y.numpy())
# [[-1. 6.]
# [ 1. 16.]]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册