-
Notifications
You must be signed in to change notification settings - Fork 766
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
映射文档 torch.nn.functional.dropout2d/dropout3d #6161
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...convert_from_pytorch/api_difference/functional/torch.nn.functional.dropout2d.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## [ torch 参数更多 ]torch.nn.functional.dropout2d | ||
|
||
### [torch.nn.functional.dropout2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.dropout2d.html#torch.nn.functional.dropout2d) | ||
|
||
```python | ||
torch.nn.functional.dropout2d(input, p=0.5, training=True, inplace=False) | ||
``` | ||
|
||
### [paddle.nn.functional.dropout2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/dropout2d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.dropout2d(x, p=0.5, training=True, data_format='NCHW', name=None) | ||
``` | ||
|
||
PyTorch 对于 dropout1d/dropout2d/dropout3d,是将某个 Channel 以一定概率全部置 0,Paddle 是所有元素以一定概率置 0,但该差异一般不影响网络训练效果。 | ||
其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| -------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | ||
| input | x | 输入的多维 Tensor,仅参数名不一致。 | | ||
| p | p | 将输入节点置 0 的概率,即丢弃概率。 | | ||
| training | training | 标记是否为训练阶段。 | | ||
| inplace | - | 表示在不更改变量的内存地址的情况下,直接修改变量的值,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | ||
| - | data_format | 指定输入的数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | |
23 changes: 23 additions & 0 deletions
23
...convert_from_pytorch/api_difference/functional/torch.nn.functional.dropout3d.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## [ torch 参数更多 ]torch.nn.functional.dropout3d | ||
|
||
### [torch.nn.functional.dropout3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.dropout3d.html#torch.nn.functional.dropout3d) | ||
|
||
```python | ||
torch.nn.functional.dropout3d(input, p=0.5, training=True, inplace=False) | ||
``` | ||
|
||
### [paddle.nn.functional.dropout3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/dropout3d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.dropout3d(x, p=0.5, training=True, name=None) | ||
``` | ||
|
||
PyTorch 对于 dropout1d/dropout2d/dropout3d,是将某个 Channel 以一定概率全部置 0,Paddle 是所有元素以一定概率置 0,但该差异一般不影响网络训练效果。 | ||
其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| -------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | ||
| input | x | 输入的多维 Tensor,仅参数名不一致。 | | ||
| p | p | 将输入节点置 0 的概率,即丢弃概率。 | | ||
| training | training | 标记是否为训练阶段。 | | ||
| inplace | - | 表示在不更改变量的内存地址的情况下,直接修改变量的值,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
想问一下,该目录会在官网公开暴露吗?
model_convert/convert_from_pytorch/api_difference/functional/...
因为在官网路径上没找到
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhwesky2010 可以看下么,我理解应该是不会在官网公布的吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
会在官网公布: https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md 这个页面
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunzhongkai588 现在还有什么问题吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是之后统一加嘛?因为这个pr里没有在 pytorch_api_mapping_cn 加上
torch.nn.functional.dropout2d
和torch.nn.functional.dropout3d
http://preview-pr-6161.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.html#torch-nn-functional-xx-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropout2d 接口修改需要确认