-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix nd.slice for following inputs: (1) begin=end and (2) end=-1, step=-1 #14107
Conversation
@mxnet-label-bot add [pr-awaiting-review, Operator] |
dd28023
to
77d09e4
Compare
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.
Looks good, but I left a comment to address:
Beyond other comments, I suggest you expand the test coverage to include the fix for #14105
@mseth10 Thanks for the contribution, could you address the comments? |
77d09e4
to
a8eff26
Compare
a8eff26
to
8dd2fb1
Compare
6db3b7a
to
5f646bb
Compare
@szha @marcoabreu I have made the requested changes. Can you please review again. Thanks! |
explicitly expressing empty tensor is currently not possible, and it will cause many problems because of the various sanity check that assumes not legal empty tensor. |
For the first case it should throw exception ( We are planning to support zero-size arrays. But until then, the current behavior should be kept. |
@mxnet-label-bot add [pr-work-in-progress] |
5f646bb
to
366a55d
Compare
366a55d
to
56c49f5
Compare
Created new PR #14403 which does not deal with empty tensors. |
Description
This PR fixes nd.slice for erroneous output in the following cases:
(1) begin=end ( fixes #13760 ). Throws invalid input error.
(2) end=-1, step=-1 ( fixes #14105 ). Added tests for the same.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments