Skip to content

Commit

Permalink
[SCU][Docathon][Add API Legend No.52]为masked_fill API添加图例 (#6927)
Browse files Browse the repository at this point in the history
* 修改masked_fill文档描述并增加图例

* Update masked_fill_cn.rst
  • Loading branch information
PolaKuma authored Nov 6, 2024
1 parent f518d43 commit 2ce6848
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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.

0 comments on commit 2ce6848

Please # to comment.