# tensorplay.functional.abs Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.abs.html ```python tensorplay.functional.abs(input: Tensor, *, out: Tensor | None) → Tensor ``` Computes the absolute value of each element in input. $$\text{out}_{i} = |\text{input}_{i}|$$ Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. Keyword Arguments: out ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), optional) – the output tensor. Example: ``` >>> tensorplay.abs(tensorplay.tensor([-1, -2, 3])) tensor([ 1, 2, 3]) ```