220 Star 949 Fork 699

GVPMindSpore/mindscience

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mindsponge.common.vecs_dot_vecs.rst 661 Bytes
一键复制 编辑 原始数据 按行查看 历史
十六夜 提交于 2023-03-31 16:37 +08:00 . API 格式修改

mindsponge.common.vecs_dot_vecs

.. py:function:: mindsponge.common.vecs_dot_vecs(v1, v2)

    计算向量 :math:`v_1 = (x_1, x_2, x_3)` 和向量 :math:`v_2 = (y_1, y_2, y_3)` 的内积。

    .. math::

        res = x_1 * y_1 + x_2 * y_2 + x_3 * y_3

    参数:
        - **v1** (tuple) - 向量 :math:`\vec v_1` ,长度为3,数据类型为标量或者shape相同的Tensor。
        - **v2** (tuple) - 向量 :math:`\vec v_2` ,长度为3,数据类型为标量或者shape相同的Tensor。

    返回:
        标量或Tensor,形状与输入中的数据相同。两个向量内积的结果。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mindspore/mindscience.git
git@gitee.com:mindspore/mindscience.git
mindspore
mindscience
mindscience
r0.5

搜索帮助