parameters: (x, name=None)
docstring: Computes the absolute value of a tensor.
  
    Given a tensor of real numbers `x`, this operation returns a tensor
    containing the absolute value of each element in `x`. For example, if x is
    an input element and y is an output element, this operation computes
    \\\\(y = |x|\\\\).
  
    See [`tf.complex_abs()`](#tf_complex_abs) to compute the absolute value of a complex
    number.
  
    Args:
      x: A `Tensor` or `SparseTensor` of type `float32`, `float64`, `int32`, or
        `int64`.
      name: A name for the operation (optional).
  
    Returns:
      A `Tensor` or `SparseTensor` the same size and type as `x` with absolute
        values.
docstring_summary: Computes the absolute value of a tensor.
docstring_tokens: Computes the absolute value of a tensor .
function: def abs(x, name=None):
    """Computes the absolute value of a tensor.
  
    Given a tensor of real numbers `x`, this operation returns a tensor
    containing the absolute value of each element in `x`. For example, if x is
    an input element and y is an output element, this operation computes
    \\\\(y = |x|\\\\).
  
    See [`tf.complex_abs()`](#tf_complex_abs) to compute the absolute value of a complex
    number.
  
    Args:
      x: A `Tensor` or `SparseTensor` of type `float32`, `float64`, `int32`, or
        `int64`.
      name: A name for the operation (optional).
  
    Returns:
      A `Tensor` or `SparseTensor` the same size and type as `x` with absolute
        values.
    """
    with ops.op_scope([x], name, "Abs") as name:
      if isinstance(x, ops.SparseTensor):
        if x.values.dtype in (dtypes.complex64, dtypes.complex128):
          x_abs = gen_math_ops.complex_abs(x.values,
              Tout=x.values.dtype.real_dtype, name=name)
          return ops.SparseTensor(indices=x.indices, values=x_abs, shape=x.shape)
        x_abs = gen_math_ops._abs(x.values, name=name)
        return ops.SparseTensor(indices=x.indices, values=x_abs, shape=x.shape)
      else:
        x = ops.convert_to_tensor(x, name="x")
        if x.dtype in (dtypes.complex64, dtypes.complex128):
          return gen_math_ops.complex_abs(x, Tout=x.dtype.real_dtype, name=name)
        return gen_math_ops._abs(x, name=name)
function_tokens: def abs ( x , name = None ) : with ops . op_scope ( [ x ] , name , "Abs" ) as name : if isinstance ( x , ops . SparseTensor ) : if x . values . dtype in ( dtypes . complex64 , dtypes . complex128 ) : x_abs = gen_math_ops . complex_abs ( x . values , Tout = x . values . dtype . real_dtype , name = name ) return ops . SparseTensor ( indices = x . indices , values = x_abs , shape = x . shape ) x_abs = gen_math_ops . _abs ( x . values , name = name ) return ops . SparseTensor ( indices = x . indices , values = x_abs , shape = x . shape ) else : x = ops . convert_to_tensor ( x , name = "x" ) if x . dtype in ( dtypes . complex64 , dtypes . complex128 ) : return gen_math_ops . complex_abs ( x , Tout = x . dtype . real_dtype , name = name ) return gen_math_ops . _abs ( x , name = name )