Calculates the absolute value of a tensor.