-
Couldn't load subscription status.
- Fork 5.9k
[API compatibility] add paddle nn.functional.dropout1d api #74444
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
Conversation
| 你的PR提交成功,感谢你对开源项目的贡献! |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (12.50%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@ ## develop #74444 +/- ## ========================================== Coverage ? 12.50% ========================================== Files ? 1 Lines ? 16 Branches ? 0 ========================================== Hits ? 2 Misses ? 14 Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| /re-run all-failed |
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.
看看inplace这个问题,目前yaml里支持了inplace,能否支持一个inplace版本的dropout_接口。inpplace=False时调用dropout,inplace=True时,调用dropout_。
或者通过assign(output)这种能否支持?
a3add90 to 8fa6fe1 Compare 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.
assing实现的话可能得充分测下反向,看看与竞品的inplace=True下反向是不是一样
| dropout=0下rtol是不是不用降低 |
8fa6fe1 to a8e5962 Compare a8e5962 to 3c57518 Compare 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.
LGTM
| /re-run all-failed |
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.
LGTM
PR Category
User Experience
PR Types
New features
Description
增加paddle nn.functional.dropout1d(input, p=0.5, training=True, inplace=False) api
参数:
input (Tensor): 输入张量,形状需为 [C, L] 或 [N, C, L]
p (float): 置零概率(0-1),默认 0.5
training (bool): 是否训练模式,默认 True
inplace (bool): Paddle 暂不支持,仅为兼容 API
WARNING:
当前dropout,dropout1d,dropout2d,dropout3d均不支持inpalce,后续会在dropout中实现dropout_nd C++下沉,同时支持inpacle。
Note:
在 paddle.nn.functional.dropout 中,axis 参数控制 dropout 的应用维度:
当 axis=None(默认值):对输入 Tensor x 中的任意元素,以丢弃概率 p 随机将一些元素输出置 0。
当 axis≠None 时(如 axis=1):以一定的概率从图像特征或语音序列中丢弃掉整个通道。
虽然文档中建议 axis 保持默认值,但这里将 axis 设置为 1 更符合 dropout1d 的含义。

pcard-67164