mindsponge.common.vecs_dot_vecs
- mindsponge.common.vecs_dot_vecs(v1, v2)[source]
Dot product of vectors \(v_1 = (x_1, x_2, x_3)\) and \(v_2 = (y_1, y_2, y_3)\).
\[res = x_1 * y_1 + x_2 * y_2 + x_3 * y_3\]- Parameters
- Returns
float or Tensor with the same shape as the Tensor in input, dot product result of two vectors .
- Supported Platforms:
Ascend
GPU
Examples
>>> import mindsponge >>> v1 = (1, 2, 3) >>> v2 = (3, 4, 5) >>> ans = mindsponge.common.vecs_dot_vecs(v1, v2) >>> print(ans) 26