-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Added rois shape check in C++ #2794
Conversation
6422016
to
015c170
Compare
Codecov Report
@@ Coverage Diff @@
## master #2794 +/- ##
=======================================
Coverage 73.22% 73.22%
=======================================
Files 96 96
Lines 8446 8446
Branches 1320 1320
=======================================
Hits 6185 6185
Misses 1859 1859
Partials 402 402
Continue to review full report at Codecov.
|
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.
Thanks for the PR!
Unfortunately the location of the checks is not correct, and they should be pushed up to the cpu
/ cuda
functions.
This is because the dispatcher (which currently is only setup for NMS and RoIAlign) don't perform argchecking in the main dispatcher code, and thus those checks are probably going to be skipped.
See the PR porting NMS to use the dispatcher in 4e8deeb to see that we had subtle errors and had to duplicate the checks in the cpu / cuda folders.
Taking a comment from @ezyang who pointed out the issue
but right now, you have to make a helper function and make sure the cpu and cuda functions call that helper function manually
do NOT put size checks in the dispatching function, you are not guaranteed to call that function, and also if you put the checks there you'll do them repeatedly uselessly
- Replaced old AT_ASSERT/ERROR by new TORCH_CHECK
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.
Thanks a lot!
* Added rois shape check in C++ * Fixes code formatting * Remove accidental include * - Updated code according to the review - Replaced old AT_ASSERT/ERROR by new TORCH_CHECK
* Added rois shape check in C++ * Fixes code formatting * Remove accidental include * - Updated code according to the review - Replaced old AT_ASSERT/ERROR by new TORCH_CHECK
Related to #2779
Desription:
rois
1st dimension for all ROI* ops