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

[SCU][Docathon][Add API Legend No.1] Add the picture of broadcast_to #6977

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions docs/api/paddle/broadcast_to_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ broadcast_to

``x`` 的维数和 ``shape`` 的元素数应小于等于 6,并且 ``shape`` 中的元素数应该大于等于 ``x`` 的维数。扩展的维度的维度值应该为 1。

Original Tensor” 显示了一个形状为 [3]的一维张量[1, 2, 3]。
通过 tensor.broadcast_to((2, 3))方法被广播扩展为一个形状为[2, 3]的二维张量。
其中每一行均为原张量的值,广播的结果在右侧图中展示。
Comment on lines +12 to +14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • original tensor 是什么?通过 tensor.broadcast_to((2, 3))方法被... 也不准确,broadcast_to 是需要最少两个参数的,你可以优化一下,或者直接写 通过 broadcast_to 方法..
  • 得加图片的引用呀,否则在官网无法显示,请务必仔细参考示例



参数
:::::::::
- **x** (Tensor) - 输入的 Tensor,数据类型为:bool、float16、float32、float64、int32、int64、uint8 或 uint16。
Expand Down
Binary file added docs/images/api_legend/broadcast_to.png
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broadcast_to 之后的tensor 可以用二维矩阵表示,不用叠上去

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.