Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docathon][Add API Legend No.42] as_complex #6913

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/api/paddle/as_complex_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ as_complex

输入 Tensor 的形状是 ``(*, 2)`` (其中 ``*`` 表示任意形状),亦即,输入的最后一维的大小必须是 2,这对应着复数的实部和虚部。输出 Tensor 的形状是 ``(*,)``。

下图展示了一个 as_complex 简单的使用情形。一个形状为[2, 3, 2]的实数 Tensor 经过 as_complex 转换,最后一个长度为 2 的维度被合并为复数,形状变为[2, 3]。

.. figure:: ../../images/api_legend/as_complex.png
:alt: as_complex 图示
:width: 500
:align: center
参数
:::::::::
- **x** (Tensor) - 输入 Tensor,数据类型为:float32 或 float64。
Expand Down
Binary file added docs/images/api_legend/as_complex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.