mindspore/docs/api/api_python/ops/mindspore.ops.func_hypot.rst

22 lines
720 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.hypot
====================
.. py:function:: mindspore.ops.hypot(x, other)
按元素计算以输入Tensor为直角边的三角形的斜边。
两个输入的shape需要支持广播数据类型应为float32、float64。
.. math::
out_i = \sqrt{x_i^2 + other_i^2}
参数:
- **x** (Tensor) - 第一个输入Tesnor。
- **other** (Tensor) - 第二个输入Tesnor。
返回:
Tensorshape和广播后的shape相同数据类型为两个输入数据中精度更高的。
异常:
- **TypeError** - 如果 `x``other` 的类型不是float32或float64。
- **ValueError** - 两个输入参数的shape不支持广播。