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

25 lines
758 B
ReStructuredText
Raw Permalink 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.ComplexAbs
=========================
.. py:class:: mindspore.ops.ComplexAbs
返回输入复数的模。
输入复数的形式为 :math:`a + bj` ,其中 :math:`a` 为实部, :math:`b` 为虚部。
.. math::
y = \sqrt{a^2+b^2}
.. warning::
这是一个实验性API后续可能修改或删除。
输入:
- **x** (Tensor) - 复数Tensor格式须为complex64或complex128。
输出:
Tensor。如果 `x` 的类型是complex64则输出的类型是float32如果 `x` 的类型是complex128则输出的类型是float64。
异常:
- **TypeError** - 输入 `x` 不是Tensor。
- **TypeError** - 输入 `x` 不是complex64或complex128格式。