-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[0-size Tensor Job2 No.106] Add 0-size Tensor support for roi_pool #73740
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
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
| int channels = x_dims[1]; | ||
| int height = x_dims[2]; | ||
| int width = x_dims[3]; | ||
| int rois_num = boxes.dims()[0]; |
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.
这里不应该将int64_t改为int。因为对于大Tensor而言,任何一个维度的大小都有可能超过int的上限。
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #73740 +/- ##
===========================================
Coverage ? 100.00%
===========================================
Files ? 2
Lines ? 9
Branches ? 0
===========================================
Hits ? 9
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
请签署下CLA |
DanielSun11
left a comment
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
PR Category
Operator Mechanism
PR Types
Bug fixes
Description
roi_align函数输出Tensor的shape为 [box[0], input[1], pooled_height, pooled_width],其中pooled_height, pooled_width 是都要大于0,所以需要对 input和box的numel为0时进行特殊处理。
修复前,存在cuda error(9) 问题,需要进行修复。

修复:
cuda error(9) 报错修复:
使用--paddle_only 和 --accuracy 选项时,出现numpy error错误(不做处理)
pcard-67164