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 MaxUnPool3D op and MaxUnPool1D op #38716

Merged
merged 9 commits into from
Jan 10, 2022

Conversation

andyjiang1116
Copy link
Contributor

@andyjiang1116 andyjiang1116 commented Jan 5, 2022

PR types

New features

PR changes

OPs

Describe

Add MaxUnPool3D op and MaxUnPool1D op.

MaxUnPool3D op:

截屏2022-01-06 上午9 43 24

截屏2022-01-06 上午11 06 33

MaxUnPool1D op:

截屏2022-01-06 下午7 03 03

截屏2022-01-06 下午7 03 15

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jan 5, 2022

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

tink2123
tink2123 previously approved these changes Jan 6, 2022
Copy link
Contributor

@tink2123 tink2123 left a comment

Choose a reason for hiding this comment

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

LGTM

@andyjiang1116 andyjiang1116 changed the title Add MaxUnPool3D op Add MaxUnPool3D op and MaxUnPool1D op Jan 6, 2022
# use 2d to implenment 1d should expand padding in advance.
padding = _expand_low_nd_padding(padding)

if data_format not in ["NCHW"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

这个判断没有意义,建议判断是否是NCL,然后再转换成NCHW

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,我改一下

@jeff41404
Copy link
Contributor

use composition of unpool2d、squeeze and unsqueeze to implement unpool1d, better to test performance.

@andyjiang1116
Copy link
Contributor Author

use composition of unpool2d、squeeze and unsqueeze to implement unpool1d, better to test performance.

I have test 10000 times for paddle and torch, the results is 0.000104s(paddle) vs 0.003229s(torch), so
paddle.nn.MaxUnPool1D is much better than torch.nn.MaxUnpool1d,

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

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

@jeff41404 jeff41404 merged commit 7e31542 into PaddlePaddle:develop Jan 10, 2022
@andyjiang1116 andyjiang1116 deleted the add_maxunpool3d branch May 15, 2023 07:41
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.

6 participants