abs¶
- paddle. abs ( x, name=None ) [source]
- 
         Abs Operator. This operator is used to perform elementwise abs for input $X$. \(out = |x|\) - Parameters
- 
           - x (Tensor) – (Tensor), The input tensor of abs op. 
- with_quant_attr (BOOLEAN) – Whether the operator has attributes used by quantization. 
- name (str, optional) – Name for the operation (optional, default is None). For more information, please refer to Name. 
 
- Returns
- 
           (Tensor), The output tensor of abs op. 
- Return type
- 
           out (Tensor) 
 Examples import paddle x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3]) out = paddle.abs(x) print(out) # [0.4 0.2 0.1 0.3] 
