mindspore/docs/api/api_python/ops/mindspore.ops.func_ceil.rst

20 lines
571 B
ReStructuredText
Raw Permalink Normal View History

2022-07-15 15:55:02 +08:00
mindspore.ops.ceil
===================
2022-07-18 11:04:59 +08:00
.. py:function:: mindspore.ops.ceil(x)
2022-07-15 15:55:02 +08:00
向上取整函数。
.. math::
out_i = \lceil x_i \rceil = \lfloor x_i \rfloor + 1
2022-07-25 15:09:45 +08:00
参数:
- **x** (Tensor) - Ceil的输入。其数据类型为float16或float32。shape :math:`(N, *)` ,其中 :math:`*` 表示任意数量的附加维度。秩应小于8。
2022-07-15 15:55:02 +08:00
2022-07-25 15:09:45 +08:00
返回:
Tensorshape与 `x` 相同。
2022-07-15 15:55:02 +08:00
2022-07-25 15:09:45 +08:00
异常:
2023-02-13 21:21:06 +08:00
- **TypeError** - `x` 不是Tensor。
2022-07-25 15:09:45 +08:00
- **TypeError** - `x` 的数据类型既不是float16也不是float32。