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

Add grad grad for AvgPool2D #35388

Merged
merged 6 commits into from
Sep 6, 2021
Merged

Add grad grad for AvgPool2D #35388

merged 6 commits into from
Sep 6, 2021

Conversation

weisy11
Copy link
Contributor

@weisy11 weisy11 commented Sep 2, 2021

PR types

New features

PR changes

OPs

Describe

Add grad grad for AvgPool2D

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 2, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@CLAassistant
Copy link

CLAassistant commented Sep 2, 2021

CLA assistant check
All committers have signed the CLA.

@@ -381,5 +381,29 @@ def test_grad(self):
self.func(p)


class TestAvgPool2DDoubleGradCheck(unittest.TestCase):
Copy link
Contributor

Choose a reason for hiding this comment

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

建议多加一些单测,可以参考下conv的二次梯度单测。

Copy link
Contributor

@dyning dyning left a comment

Choose a reason for hiding this comment

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

是否更新了官方doc?

using framework::SingleGradOpMaker<T>::SingleGradOpMaker;

protected:
void Apply(GradOpPtr<T> grad_op) const override {
Copy link
Contributor

Choose a reason for hiding this comment

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

可以在ProtoMaker里直接复用forward op,下面就不用实现PoolGradGradKernel了。 参考

grad_op->SetType("transpose2");

Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

lgtm

@ceci3 ceci3 merged commit 97798f9 into PaddlePaddle:develop Sep 6, 2021
AnnaTrainingG pushed a commit to AnnaTrainingG/Paddle that referenced this pull request Sep 29, 2021
* add pool2d grad grad

* dbg

* add unittest

* update format

* add more unittests

* dbg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants