round¶
dragon.math.
round
(
inputs,
**kwargs
)[source]¶Compute the nearest integer of input.
\[\text{out} = \lfloor \text{input} \rceil \]Examples:
x = dragon.constant([0.9, 1.4, 1.9]) print(dragon.math.round(x)) # [1., 1., 2.]
- Parameters:
- inputs (dragon.Tensor) – The input tensor.
- Returns:
dragon.Tensor – The output tensor.