def dot(x, y, name=None):
    "\n    This operator calculates inner product for vectors.\n\n    .. note::\n       Support 1-d and 2-d Tensor. When it is 2d, the first dimension of this matrix\n       is the batch dimension, which means that the vectors of multiple batches are dotted.\n\n    Parameters:\n        x(Tensor): 1-D or 2-D ``Tensor``. Its dtype should be ``float32``, ``float64``, ``int32``, ``int64``\n        y(Tensor): 1-D or 2-D ``Tensor``. Its dtype soulde be ``float32``, ``float64``, ``int32``, ``int64``\n        name(str, optional): Name of the output. Default is None. It's used to print debug info for developers. Details: :ref:`api_guide_Name`\n\n    Returns:\n        Tensor: the calculated result Tensor.\n\n    Examples:\n\n    .. code-block:: python\n\n        import paddle\n        import numpy as np\n\n        x_data = np.random.uniform(0.1, 1, [10]).astype(np.float32)\n        y_data = np.random.uniform(1, 3, [10]).astype(np.float32)\n        x = paddle.to_tensor(x_data)\n        y = paddle.to_tensor(y_data)\n        z = paddle.dot(x, y)\n        print(z)\n\n    "
    op_type = 'dot'
    if paddle.in_dynamic_mode():
        op = getattr(_C_ops, op_type)
        return op(x, y)
    assert (x is not None), 'x cannot be None in {}'.format(op_type)
    assert (y is not None), 'y cannot be None in {}'.format(op_type)
    check_variable_and_dtype(x, 'x', ['float32', 'float64', 'int32', 'int64'], op_type)
    check_variable_and_dtype(y, 'y', ['float32', 'float64', 'int32', 'int64'], op_type)
    helper = LayerHelper(op_type, **locals())
    if (name is None):
        out = helper.create_variable_for_type_inference(dtype=x.dtype)
    else:
        out = helper.create_variable(name=name, dtype=x.dtype, persistable=False)
    helper.append_op(type='dot', inputs={'X': x, 'Y': y}, attrs={}, outputs={'Out': out})
    return out
This operator calculates inner product for vectors.

.. note::
   Support 1-d and 2-d Tensor. When it is 2d, the first dimension of this matrix
   is the batch dimension, which means that the vectors of multiple batches are dotted.

Parameters:
    x(Tensor): 1-D or 2-D ``Tensor``. Its dtype should be ``float32``, ``float64``, ``int32``, ``int64``
    y(Tensor): 1-D or 2-D ``Tensor``. Its dtype soulde be ``float32``, ``float64``, ``int32``, ``int64``
    name(str, optional): Name of the output. Default is None. It's used to print debug info for developers. Details: :ref:`api_guide_Name`

Returns:
    Tensor: the calculated result Tensor.

Examples:

.. code-block:: python

    import paddle
    import numpy as np

    x_data = np.random.uniform(0.1, 1, [10]).astype(np.float32)
    y_data = np.random.uniform(1, 3, [10]).astype(np.float32)
    x = paddle.to_tensor(x_data)
    y = paddle.to_tensor(y_data)
    z = paddle.dot(x, y)
    print(z)
def dot(x, y, name=None):
    "\n    This operator calculates inner product for vectors.\n\n    .. note::\n       Support 1-d and 2-d Tensor. When it is 2d, the first dimension of this matrix\n       is the batch dimension, which means that the vectors of multiple batches are dotted.\n\n    Parameters:\n        x(Tensor): 1-D or 2-D ``Tensor``. Its dtype should be ``float32``, ``float64``, ``int32``, ``int64``\n        y(Tensor): 1-D or 2-D ``Tensor``. Its dtype soulde be ``float32``, ``float64``, ``int32``, ``int64``\n        name(str, optional): Name of the output. Default is None. It's used to print debug info for developers. Details: :ref:`api_guide_Name`\n\n    Returns:\n        Tensor: the calculated result Tensor.\n\n    Examples:\n\n    .. code-block:: python\n\n        import paddle\n        import numpy as np\n\n        x_data = np.random.uniform(0.1, 1, [10]).astype(np.float32)\n        y_data = np.random.uniform(1, 3, [10]).astype(np.float32)\n        x = paddle.to_tensor(x_data)\n        y = paddle.to_tensor(y_data)\n        z = paddle.dot(x, y)\n        print(z)\n\n    "
    op_type = 'dot'
    if paddle.in_dynamic_mode():
        op = getattr(_C_ops, op_type)
        return op(x, y)
    assert (x is not None), 'x cannot be None in {}'.format(op_type)
    assert (y is not None), 'y cannot be None in {}'.format(op_type)
    check_variable_and_dtype(x, 'x', ['float32', 'float64', 'int32', 'int64'], op_type)
    check_variable_and_dtype(y, 'y', ['float32', 'float64', 'int32', 'int64'], op_type)
    helper = LayerHelper(op_type, **locals())
    if (name is None):
        out = helper.create_variable_for_type_inference(dtype=x.dtype)
    else:
        out = helper.create_variable(name=name, dtype=x.dtype, persistable=False)
    helper.append_op(type='dot', inputs={'X': x, 'Y': y}, attrs={}, outputs={'Out': out})
    return out