parameters: (x, name=None)
return_statement: return layers.scale(x, scale=-1.0, bias=0.0, bias_after_scale=True, act=None, name=name)
docstring: This function computes the negative of the Tensor elementwisely.
  
      Args:
          x (Tensor): Input of neg operator, an N-D Tensor, with data type float32, float64, int8, int16, int32, or int64.
          name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.
  
      Returns:
          out (Tensor): The negative of input Tensor. The shape and data type are the same with input Tensor.
  
      Examples:
          .. code-block:: python
  
              import paddle
  
              x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
              out = paddle.neg(x)
              print(out)
              # [0.4 0.2 -0.1 -0.3]
docstring_summary: This function computes the negative of the Tensor elementwisely.
docstring_tokens: This function computes the negative of the Tensor elementwisely .
function: def neg(x, name=None):
      """
      This function computes the negative of the Tensor elementwisely.
  
      Args:
          x (Tensor): Input of neg operator, an N-D Tensor, with data type float32, float64, int8, int16, int32, or int64.
          name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.
  
      Returns:
          out (Tensor): The negative of input Tensor. The shape and data type are the same with input Tensor.
  
      Examples:
          .. code-block:: python
  
              import paddle
  
              x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
              out = paddle.neg(x)
              print(out)
              # [0.4 0.2 -0.1 -0.3]
      """
  
      return layers.scale(x, scale=-1.0, bias=0.0, bias_after_scale=True, act=None, name=name)
function_tokens: def neg ( x , name = None ) : return layers . scale ( x , scale = - 1.0 , bias = 0.0 , bias_after_scale = True , act = None , name = name )