2.4K Star 8.2K Fork 4.4K

GVPMindSpore / mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
round_doc.yaml 746 Bytes
一键复制 编辑 原始数据 按行查看 历史
chenfei_mindspore 提交于 2024-02-26 16:24 . move doc.yaml to doc dir
round:
description: |
Returns half to even of a tensor element-wise.
.. math::
out_i \approx input_i
Args:
input (Tensor): The input tensor.
Returns:
Tensor, has the same shape and type as the `input`.
Raises:
TypeError: If `input` is not a Tensor.
Supported Platforms:
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor, ops
>>> input = Tensor(np.array([0.8, 1.5, 2.3, 2.5, -4.5]), mindspore.float32)
>>> output = ops.round(input)
>>> print(output)
[ 1. 2. 2. 2. -4.]
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
master

搜索帮助