-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix pool3d bug, test=develop #27718
Conversation
Thanks for your contribution! |
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.
also fix the 2d and cuda version?
(exclusive || adaptive) | ||
? (dend - dstart) * (hend - hstart) * (wend - wstart) | ||
: ksize_depth * ksize_height * ksize_width; | ||
if (exclusive || adaptive) { |
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.
this check seems redundant now, isn't pool_size
always the same value?
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.
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);
Got it! |
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.
the cuda version seems unused, maybe remove later.
* fix pool3d bug, test=develop * fix unitest, test=develop * fix test and fix pool2d bug, test=develop
* fix pool3d bug, test=develop * fix unitest, test=develop * fix test and fix pool2d bug, test=develop
PR types
Bug fixes
PR changes
OPs
Describe
fix pool3d bug, http://newicafe.baidu.com/v5/issue/DLTP-12154/show?cid=5