mindspore.mint.dot

View Source On AtomGit
mindspore.mint.dot(input, other)[source]

Compute the dot product of two 1D tensors.

Parameters
  • input (Tensor) – The first input tensor in the dot product, must be 1-D.

  • other (Tensor) – The second input tensor in the dot product, must be 1-D.

Returns

Tensor, the shape is [] and the data type is the same as input.

Supported Platforms:

Ascend

Examples

>>> import mindspore
>>> x = mindspore.tensor([2.0, 3.0])
>>> y = mindspore.tensor([2.0, 1.0])
>>> mindspore.mint.dot(x, y)
Tensor(shape=[], dtype=Float32, value= 7)