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

fix pool3d bug, test=develop #27718

Merged
merged 3 commits into from
Oct 10, 2020
Merged

fix pool3d bug, test=develop #27718

merged 3 commits into from
Oct 10, 2020

Conversation

LDOUBLEV
Copy link
Contributor

PR types

Bug fixes

PR changes

OPs

Describe

fix pool3d bug, http://newicafe.baidu.com/v5/issue/DLTP-12154/show?cid=5

@paddle-bot-old
Copy link

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

Copy link
Contributor

@willthefrog willthefrog left a comment

Choose a reason for hiding this comment

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

also fix the 2d and cuda version?

(exclusive || adaptive)
? (dend - dstart) * (hend - hstart) * (wend - wstart)
: ksize_depth * ksize_height * ksize_width;
if (exclusive || adaptive) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this check seems redundant now, isn't pool_size always the same value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not redundant to updatepool_size when padding is not zero.
The variable pool_size will be updated after running the following code.

pool_size = (dend - dstart) * (hend - hstart) * (wend - wstart);
dstart = std::max(dstart, 0);
hstart = std::max(hstart, 0);
wstart = std::max(wstart, 0);
dend = std::min(dend, input_depth);
hend = std::min(hend, input_height);
wend = std::min(wend, input_width);

@LDOUBLEV
Copy link
Contributor Author

also fix the 2d and cuda version?

Got it!

Copy link
Contributor

@willthefrog willthefrog left a comment

Choose a reason for hiding this comment

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

LGTM.

the cuda version seems unused, maybe remove later.

@ceci3 ceci3 merged commit f6ad237 into PaddlePaddle:develop Oct 10, 2020
LDOUBLEV added a commit to LDOUBLEV/Paddle that referenced this pull request Oct 12, 2020
* fix pool3d bug, test=develop

* fix unitest, test=develop

* fix test and fix pool2d bug, test=develop
chen-zhiyu pushed a commit to chen-zhiyu/Paddle that referenced this pull request Oct 15, 2020
* fix pool3d bug, test=develop

* fix unitest, test=develop

* fix test and fix pool2d bug, test=develop
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.

3 participants