Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

【Hackathon 6th No.16】为 Paddle 新增 LPPool1D / LPPool2D API

Open Asthestarsfalll opened this issue 10 months ago • 9 comments

PR Category

Others

PR Types

Others

Description

rfc:

  • https://github.com/PaddlePaddle/community/pull/894

中文文档:

  • https://github.com/PaddlePaddle/docs/pull/6639

lp pool,前向公式

$$ f(X) = (\sum_{x \in X} x^p)^{\frac{1}{p}} $$

反向公式

$$ grad = \sum_{x \in X} (x^{p - 1} f(X)^{1 - p}) $$

本实现直接借用了 PoolRawKernel,当 norm_type 为 $\infty$ 时,等价与最大池化,因此直接调用了 MaxPool;这样似乎可以直接支持LPPool3D,如果有需求的话。单测结果: 240415_21h23m27s_screenshot

Asthestarsfalll avatar Apr 15 '24 14:04 Asthestarsfalll

你的PR提交成功,感谢你对开源项目的贡献! 请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。 Your PR has been submitted. Thanks for your contribution! Please wait for the result of CI firstly. See Paddle CI Manual for details.

paddle-bot[bot] avatar Apr 15 '24 14:04 paddle-bot[bot]

@cyber-pioneer 老师大部分CI已通过,请先审一下吧。

Asthestarsfalll avatar Apr 22 '24 08:04 Asthestarsfalll

Sorry to inform you that 7c9e1dd's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

paddle-ci-bot[bot] avatar Apr 25 '24 03:04 paddle-ci-bot[bot]

Sorry to inform you that d1f4508's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

paddle-ci-bot[bot] avatar May 03 '24 03:05 paddle-ci-bot[bot]

缺少float16和float64的单测?

cyber-pioneer avatar May 07 '24 10:05 cyber-pioneer

任务完成度很高,手动点赞👍

cyber-pioneer avatar May 07 '24 10:05 cyber-pioneer

@Asthestarsfalll 需要附上 RFC 链接。如果之前的RFC思路和你这儿的有所区别,需要提一个修改 RFC 的PR

luotao1 avatar May 07 '24 11:05 luotao1

@Asthestarsfalll 需要附上 RFC 链接。如果之前的RFC思路和你这儿的有所区别,需要提一个修改 RFC 的PR

已添加~

Asthestarsfalll avatar May 08 '24 07:05 Asthestarsfalll

Sorry to inform you that 1cba1b5's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

paddle-ci-bot[bot] avatar May 15 '24 03:05 paddle-ci-bot[bot]

@cyber-pioneer 老师请审核~

Asthestarsfalll avatar May 18 '24 09:05 Asthestarsfalll

冲突了,而且DCU流水线失败,需要修复

luotao1 avatar May 22 '24 03:05 luotao1