def mv(x, vec, name=None):
    '\n    Performs a matrix-vector product of the matrix x and the vector vec.\n\n    Args:\n        x (Tensor): A tensor with shape :math:`[M, N]` , The data type of the input Tensor x\n            should be one of float32, float64.\n        vec (Tensor): A tensor with shape :math:`[N]` , The data type of the input Tensor x\n            should be one of float32, float64.\n        name(str, optional): The default value is None.  Normally there is no need for user to set this\n            property.  For more information, please refer to :ref:`api_guide_Name`.\n\n    Returns:\n        Tensor: The tensor which is producted by x and vec.\n\n    Examples:\n        .. code-block:: python\n\n            # x: [M, N], vec: [N]\n            # paddle.mv(x, vec)  # out: [M]\n\n            import numpy as np\n            import paddle\n\n            x_data = np.array([[2, 1, 3], [3, 0, 1]]).astype("float64")\n            x = paddle.to_tensor(x_data)\n            vec_data = np.array([3, 5, 1])\n            vec = paddle.to_tensor(vec_data).astype("float64")\n            out = paddle.mv(x, vec)\n    '
    if in_dygraph_mode():
        return _C_ops.final_state_mv(x, vec)
    elif _in_legacy_dygraph():
        out = _C_ops.mv(x, vec)
        return out
    else:

        def __check_input(x, vec):
            var_names = {'x': x, 'vec': vec}
            for (name, val) in var_names.items():
                check_variable_and_dtype(val, name, ['float32', 'float64'], 'mv')
            x_shape = list(x.shape)
            vec_shape = list(vec.shape)
            if (len(x_shape) != 2):
                raise ValueError("x should be 2-dimensional. But received x's dimention: {}".format(x_shape))
            if (len(vec_shape) != 1):
                raise ValueError("vec should be 1-dimensional. But received vec's dimention: {}".format(vec_shape))
        __check_input(x, vec)
        helper = LayerHelper('mv', **locals())
        out = helper.create_variable_for_type_inference(dtype=x.dtype)
        helper.append_op(type='mv', inputs={'X': x, 'Vec': vec}, outputs={'Out': out})
        return out
Performs a matrix-vector product of the matrix x and the vector vec.

Args:
    x (Tensor): A tensor with shape :math:`[M, N]` , The data type of the input Tensor x
        should be one of float32, float64.
    vec (Tensor): A tensor with shape :math:`[N]` , The data type of the input Tensor x
        should be one of float32, float64.
    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: The tensor which is producted by x and vec.

Examples:
    .. code-block:: python

        # x: [M, N], vec: [N]
        # paddle.mv(x, vec)  # out: [M]

        import numpy as np
        import paddle

        x_data = np.array([[2, 1, 3], [3, 0, 1]]).astype("float64")
        x = paddle.to_tensor(x_data)
        vec_data = np.array([3, 5, 1])
        vec = paddle.to_tensor(vec_data).astype("float64")
        out = paddle.mv(x, vec)
def mv(x, vec, name=None):
    '\n    Performs a matrix-vector product of the matrix x and the vector vec.\n\n    Args:\n        x (Tensor): A tensor with shape :math:`[M, N]` , The data type of the input Tensor x\n            should be one of float32, float64.\n        vec (Tensor): A tensor with shape :math:`[N]` , The data type of the input Tensor x\n            should be one of float32, float64.\n        name(str, optional): The default value is None.  Normally there is no need for user to set this\n            property.  For more information, please refer to :ref:`api_guide_Name`.\n\n    Returns:\n        Tensor: The tensor which is producted by x and vec.\n\n    Examples:\n        .. code-block:: python\n\n            # x: [M, N], vec: [N]\n            # paddle.mv(x, vec)  # out: [M]\n\n            import numpy as np\n            import paddle\n\n            x_data = np.array([[2, 1, 3], [3, 0, 1]]).astype("float64")\n            x = paddle.to_tensor(x_data)\n            vec_data = np.array([3, 5, 1])\n            vec = paddle.to_tensor(vec_data).astype("float64")\n            out = paddle.mv(x, vec)\n    '
    if in_dygraph_mode():
        return _C_ops.final_state_mv(x, vec)
    elif _in_legacy_dygraph():
        out = _C_ops.mv(x, vec)
        return out
    else:

        def __check_input(x, vec):
            var_names = {'x': x, 'vec': vec}
            for (name, val) in var_names.items():
                check_variable_and_dtype(val, name, ['float32', 'float64'], 'mv')
            x_shape = list(x.shape)
            vec_shape = list(vec.shape)
            if (len(x_shape) != 2):
                raise ValueError("x should be 2-dimensional. But received x's dimention: {}".format(x_shape))
            if (len(vec_shape) != 1):
                raise ValueError("vec should be 1-dimensional. But received vec's dimention: {}".format(vec_shape))
        __check_input(x, vec)
        helper = LayerHelper('mv', **locals())
        out = helper.create_variable_for_type_inference(dtype=x.dtype)
        helper.append_op(type='mv', inputs={'X': x, 'Vec': vec}, outputs={'Out': out})
        return out