mindspore.ops.Round
- class mindspore.ops.Round[源代码]
更多参考详见
mindspore.ops.round()
。- 支持平台:
Ascend
GPU
CPU
样例:
>>> x = Tensor(np.array([0.8, 1.5, 2.3, 2.5, -4.5]), mindspore.float32) >>> round = ops.Round() >>> output = round(x) >>> print(output) [ 1. 2. 2. 2. -4.]