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

【Hackathon 5th No.3】为 Paddle 新增 masked_fill API #6254

Merged
merged 8 commits into from
Nov 2, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix masked_fill doc
AndSonder committed Nov 1, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit ad50009bbd2434c620b980bfffdaf18f0638e7e4
2 changes: 1 addition & 1 deletion docs/api/paddle/Tensor_cn.rst
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tensor_cn.rst 里写的简单一点吧,就是简单介绍,参数和代码示例就不用放上来了,然后最后加上 请参考xxxxx

Original file line number Diff line number Diff line change
@@ -3059,4 +3059,4 @@ masked_fill(x, mask, value, name=None)
masked_fill_(x, mask, value, name=None)
:::::::::

Inplace 版本的 :ref:`_cn_api_paddle_masked_fill` API,对输入 `x` 采用 Inplace 策略。
Inplace 版本的 :ref:`cn_api_paddle_masked_fill` API,对输入 `x` 采用 Inplace 策略。
2 changes: 1 addition & 1 deletion docs/api/paddle/masked_fill__cn.rst
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ masked_fill\_
-------------------------------

.. py:function:: paddle.masked_fill_(x)
Inplace 版本的 :ref:`cn_api_paddle_add` API,对输入 x 采用 Inplace 策略。
Inplace 版本的 :ref:`cn_api_paddle_masked_fill` API,对输入 x 采用 Inplace 策略。

更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。

Original file line number Diff line number Diff line change
@@ -919,7 +919,7 @@
| 302 | [torch.Tensor.dequantize](https://pytorch.org/docs/1.13/generated/torch.Tensor.dequantize.html?highlight=torch+tensor+dequantize#torch.Tensor.dequantize) | | 功能缺失 |
| 303 | [torch.Tensor.sum_to_size](https://pytorch.org/docs/stable/generated/torch.Tensor.sum_to_size.html?highlight=sum_to_size#torch.Tensor.sum_to_size) | | 功能缺失 |
| 304 | [torch.Tensor.resize_](https://pytorch.org/docs/stable/generated/torch.Tensor.resize_.html?highlight=resize#torch.Tensor.resize_) | | 功能缺失 |
| 305 | [torch.Tensor.masked_fill_](https://pytorch.org/docs/stable/generated/torch.Tensor.masked_fill_.html?highlight=resize#torch.Tensor.masked_fill_) | | 功能缺失 |
| 305 | [torch.Tensor.masked_fill_](https://pytorch.org/docs/stable/generated/torch.Tensor.masked_fill_.html?highlight=resize#torch.Tensor.masked_fill_) | | 功能完全一致 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

把 paddle.masked_fill_ 加上

Suggested change
| 305 | [torch.Tensor.masked_fill_](https://pytorch.org/docs/stable/generated/torch.Tensor.masked_fill_.html?highlight=resize#torch.Tensor.masked_fill_) | | 功能完全一致 |
| 305 | [torch.Tensor.masked_fill_](https://pytorch.org/docs/stable/generated/torch.Tensor.masked_fill_.html?highlight=resize#torch.Tensor.masked_fill_) | [paddle.Tensor.masked_fill_](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#id25) | 功能完全一致 |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all done

***持续更新...***

## torch.nn.init.XX API 映射列表