def t(input, name=None):
    "\n    Transpose <=2-D tensor.\n    0-D and 1-D tensors are returned as it is and 2-D tensor is equal to\n    the paddle.transpose function which perm dimensions set 0 and 1.\n\n    Args:\n        input (Tensor): The input Tensor. It is a N-D (N<=2) Tensor of data types float16, float32, float64, int32.\n        name(str, optional): The default value is None.  Normally there is no need for\n            user to set this property.  For more information, please refer to :ref:`api_guide_Name`\n    Returns:\n        Tensor: A transposed n-D Tensor, with data type being float16, float32, float64, int32, int64.\n\n    For Example:\n\n        .. code-block:: text\n\n             # Example 1 (0-D tensor)\n             x = tensor([0.79])\n             paddle.t(x) = tensor([0.79])\n\n             # Example 2 (1-D tensor)\n             x = tensor([0.79, 0.84, 0.32])\n             paddle.t(x) = tensor([0.79, 0.84, 0.32])\n\n             # Example 3 (2-D tensor)\n             x = tensor([0.79, 0.84, 0.32],\n                        [0.64, 0.14, 0.57])\n             paddle.t(x) = tensor([0.79, 0.64],\n                                  [0.84, 0.14],\n                                  [0.32, 0.57])\n\n     Examples:\n\n        .. code-block:: python\n\n            import paddle\n            x = paddle.ones(shape=[2, 3], dtype='int32')\n            x_transposed = paddle.t(x)\n            print(x_transposed.shape)\n            # [3, 2]\n    "
    if (len(input.shape) > 2):
        raise ValueError(('Input(input) only support N-D (N<=2) tensor, but received length of Input(input) is %s. Perhaps you can use paddle.tensor.transpose() instead.' % len(input.shape)))
    if paddle.in_dynamic_mode():
        if (len(input.shape) == 1):
            return input
        perm = [1, 0]
        (out, _) = _C_ops.transpose2(input, 'axis', perm)
        return out
    check_variable_and_dtype(input, 'input', ['float16', 'float32', 'float64', 'int32', 'int64'], 'transpose')
    helper = LayerHelper('t', **locals())
    out = helper.create_variable_for_type_inference(input.dtype)
    input_shape = helper.create_variable_for_type_inference(input.dtype)
    if (len(input.shape) == 1):
        out = input
    else:
        helper.append_op(type='transpose2', inputs={'X': [input]}, outputs={'Out': [out], 'XShape': [input_shape]}, attrs={'axis': [1, 0]})
    return out
Transpose <=2-D tensor.
0-D and 1-D tensors are returned as it is and 2-D tensor is equal to
the paddle.transpose function which perm dimensions set 0 and 1.

Args:
    input (Tensor): The input Tensor. It is a N-D (N<=2) Tensor of data types float16, float32, float64, int32.
    name(str, optional): The default value is None.  Normally there is no need for
        user to set this property.  For more information, please refer to :ref:`api_guide_Name`
Returns:
    Tensor: A transposed n-D Tensor, with data type being float16, float32, float64, int32, int64.

For Example:

    .. code-block:: text

         # Example 1 (0-D tensor)
         x = tensor([0.79])
         paddle.t(x) = tensor([0.79])

         # Example 2 (1-D tensor)
         x = tensor([0.79, 0.84, 0.32])
         paddle.t(x) = tensor([0.79, 0.84, 0.32])

         # Example 3 (2-D tensor)
         x = tensor([0.79, 0.84, 0.32],
                    [0.64, 0.14, 0.57])
         paddle.t(x) = tensor([0.79, 0.64],
                              [0.84, 0.14],
                              [0.32, 0.57])

 Examples:

    .. code-block:: python

        import paddle
        x = paddle.ones(shape=[2, 3], dtype='int32')
        x_transposed = paddle.t(x)
        print(x_transposed.shape)
        # [3, 2]
def t(input, name=None):
    "\n    Transpose <=2-D tensor.\n    0-D and 1-D tensors are returned as it is and 2-D tensor is equal to\n    the paddle.transpose function which perm dimensions set 0 and 1.\n\n    Args:\n        input (Tensor): The input Tensor. It is a N-D (N<=2) Tensor of data types float16, float32, float64, int32.\n        name(str, optional): The default value is None.  Normally there is no need for\n            user to set this property.  For more information, please refer to :ref:`api_guide_Name`\n    Returns:\n        Tensor: A transposed n-D Tensor, with data type being float16, float32, float64, int32, int64.\n\n    For Example:\n\n        .. code-block:: text\n\n             # Example 1 (0-D tensor)\n             x = tensor([0.79])\n             paddle.t(x) = tensor([0.79])\n\n             # Example 2 (1-D tensor)\n             x = tensor([0.79, 0.84, 0.32])\n             paddle.t(x) = tensor([0.79, 0.84, 0.32])\n\n             # Example 3 (2-D tensor)\n             x = tensor([0.79, 0.84, 0.32],\n                        [0.64, 0.14, 0.57])\n             paddle.t(x) = tensor([0.79, 0.64],\n                                  [0.84, 0.14],\n                                  [0.32, 0.57])\n\n     Examples:\n\n        .. code-block:: python\n\n            import paddle\n            x = paddle.ones(shape=[2, 3], dtype='int32')\n            x_transposed = paddle.t(x)\n            print(x_transposed.shape)\n            # [3, 2]\n    "
    if (len(input.shape) > 2):
        raise ValueError(('Input(input) only support N-D (N<=2) tensor, but received length of Input(input) is %s. Perhaps you can use paddle.tensor.transpose() instead.' % len(input.shape)))
    if paddle.in_dynamic_mode():
        if (len(input.shape) == 1):
            return input
        perm = [1, 0]
        (out, _) = _C_ops.transpose2(input, 'axis', perm)
        return out
    check_variable_and_dtype(input, 'input', ['float16', 'float32', 'float64', 'int32', 'int64'], 'transpose')
    helper = LayerHelper('t', **locals())
    out = helper.create_variable_for_type_inference(input.dtype)
    input_shape = helper.create_variable_for_type_inference(input.dtype)
    if (len(input.shape) == 1):
        out = input
    else:
        helper.append_op(type='transpose2', inputs={'X': [input]}, outputs={'Out': [out], 'XShape': [input_shape]}, attrs={'axis': [1, 0]})
    return out