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