abs¶
dragon.vm.tensorflow.math.
abs
(
x,
name=None
)[source]¶Compute the absolute value of input.
\[\text{out} = \left| \text{input} \right| \]Examples:
print(tf.math.abs(tf.constant([-1, 0, 1]))) # [1, 0, 1]
- Parameters:
- x (dragon.Tensor) – The input tensor.
- name (str, optional) – The operation name.
- Returns:
dragon.Tensor – The output tensor.