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.52]为masked_fill API添加图例 #6927

Merged
merged 3 commits into from
Nov 6, 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
7 changes: 6 additions & 1 deletion docs/api/paddle/masked_fill_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ masked_fill

返回一个 1-D 的 Tensor,Tensor 的值是根据 ``mask`` 信息,将 ``value`` 中的值填充到 ``x`` 中 ``mask`` 对应为 ``True`` 的位置,``mask`` 的数据类型是 bool。

下图展示了一个例子:假设我们有一个所有元素值为 1 的 3x3 矩阵 `x` 和一个相同尺寸的掩码矩阵 `Mask`,`Value` 值为 3。

.. image:: ../../images/api_legend/masked_fill.png
:width: 700
:alt: 图例

参数
::::::::::::

Expand All @@ -21,7 +27,6 @@ masked_fill
::::::::::::
返回一个根据 ``mask`` 将对应位置填充为 ``value`` 的 Tensor,数据类型与 ``x`` 相同。


代码示例
::::::::::::

Expand Down
Binary file added docs/images/api_legend/masked_fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.