parameters: (x, name=None)
return_statement: return out
docstring: Transform a complex tensor to a real tensor. 
      
      The data type of the input tensor is 'complex64' or 'complex128', and the data 
      type of the returned tensor is 'float32' or 'float64', respectively.
  
      When the shape of the input tensor is ``(*, )``, (``*`` means arbitary shape),
      the shape of the output tensor is ``(*, 2)``, i.e. the shape of the output is
      the shape of the input appended by an extra ``2``.
  
      Args:
          x (Tensor): The input tensor. Data type is 'complex64' or 'complex128'.
          name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.
  
      Returns:
          Tensor: The output. Data type is 'float32' or 'float64', with the same precision as the input.
      
      Examples:
          .. code-block:: python
  
              import paddle
              x = paddle.arange(12, dtype=paddle.float32).reshape([2, 3, 2])
              y = paddle.as_complex(x)
              z = paddle.as_real(y)
              print(z.numpy())
  
              # [[[ 0.  1.]
              #   [ 2.  3.]
              #   [ 4.  5.]]
  
              #  [[ 6.  7.]
              #   [ 8.  9.]
              #   [10. 11.]]]
docstring_summary: Transform a complex tensor to a real tensor. 
      
      The data type of the input tensor is 'complex64' or 'complex128', and the data 
      type of the returned tensor is 'float32' or 'float64', respectively.
docstring_tokens: Transform a complex tensor to a real tensor . The data type of the input tensor is complex64 or complex128 and the data type of the returned tensor is float32 or float64 respectively .
function: def as_real(x, name=None):
      """Transform a complex tensor to a real tensor. 
      
      The data type of the input tensor is 'complex64' or 'complex128', and the data 
      type of the returned tensor is 'float32' or 'float64', respectively.
  
      When the shape of the input tensor is ``(*, )``, (``*`` means arbitary shape),
      the shape of the output tensor is ``(*, 2)``, i.e. the shape of the output is
      the shape of the input appended by an extra ``2``.
  
      Args:
          x (Tensor): The input tensor. Data type is 'complex64' or 'complex128'.
          name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.
  
      Returns:
          Tensor: The output. Data type is 'float32' or 'float64', with the same precision as the input.
      
      Examples:
          .. code-block:: python
  
              import paddle
              x = paddle.arange(12, dtype=paddle.float32).reshape([2, 3, 2])
              y = paddle.as_complex(x)
              z = paddle.as_real(y)
              print(z.numpy())
  
              # [[[ 0.  1.]
              #   [ 2.  3.]
              #   [ 4.  5.]]
  
              #  [[ 6.  7.]
              #   [ 8.  9.]
              #   [10. 11.]]]
      """
      if in_dygraph_mode():
          return paddle._C_ops.as_real(x)
  
      check_variable_and_dtype(x, 'x', ['complex64', 'complex128'], 'as_real')
      op_type = "as_real"
      helper = LayerHelper(op_type, **locals())
      inputs = {"X": x}
      out = helper.create_variable_for_type_inference(
          dtype=_complex_to_real_dtype(x.dtype))
      outputs = {"Out": out}
      helper.append_op(type=op_type, inputs=inputs, outputs=outputs)
      return out
function_tokens: def as_real ( x , name = None ) : if in_dygraph_mode ( ) : return paddle . _C_ops . as_real ( x ) check_variable_and_dtype ( x , 'x' , [ 'complex64' , 'complex128' ] , 'as_real' ) op_type = "as_real" helper = LayerHelper ( op_type , * * locals ( ) ) inputs = { "X" : x } out = helper . create_variable_for_type_inference ( dtype = _complex_to_real_dtype ( x . dtype ) ) outputs = { "Out" : out } helper . append_op ( type = op_type , inputs = inputs , outputs = outputs ) return out