You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OneHot should treat negative axis as range from last dimension #1313
Describe the bug
The Lotus CPU implementation OneHot rejects negative axes except -1 (rejects -2, -3...) which is overly strict and inconsistent with the spec. It should treat negative values like the other ONNX operators (Gather, Pad, Slice) as distance from the last dimension. Although the spec doesn't explicitly state this, it is implied by the wording, and the ONNX shape inference honors any negative number.
Activity
hariharans29 commentedon Jun 29, 2019
Hi Dwayne Robinson (@fdwr)
Don't you mean:
For 4D input, the output would be 5D and axis = -3 should be treated as -3 + 5 = 2 and axis = -2 should be treated as -2 + 5 = 3 ?
(Or)
continuing from the illustrative example, I think you wanted to say "Given 2D" (not "Given 4D")
fdwr commentedon Jun 29, 2019
Hariharan Seshadri (@hariharans29) Indeed :). Updated typo in-place.
Code quality improvements (#1313)