Ngraph reference implementation: OneHot specifications review.#4243
Conversation
|
@lazarevevgeny Could you please take a look? |
lazarevevgeny
left a comment
There was a problem hiding this comment.
Most of the changes looks good, but miss section about supported data types.
|
Just noticed that some constant_folding tests do pass negative indices to OneHot. This seems a little bit strange, since all negative indices will be statically casted to huge size_t numbers, and almost certainly ignored (at least for reasonable depth values, not smth like 2^30). I’m not sure if this negative-indices feature is needed, but if it does, I suggest to add smth like “When some elements from the |
CC @dmitry-gorokhov, @nshchego, @andrei-kochin One more example with negative indices like with Gather operation. @IvanNovoselov We preliminary agreed to that the behaviour with negative indices is undefined, because different plugins may work differently since we don't support negative indices. |
|
@lazarevevgeny could you please clarify what this undefined behavior means from the implementation point of view? Specifically, I would suggest:
Please, correct me if I'm getting smth wrong. |
Agree. Let's write 0 value to elements corresponding to negative elements. |
IvanNovoselov
left a comment
There was a problem hiding this comment.
All the suggested corrections were addressed.
|
@lazarevevgeny, please take a look at the corrected version, and approve the changes if everything is Ok. |
|
Please, revert commit of the mkl-dnn. |
lazarevevgeny
left a comment
There was a problem hiding this comment.
Two minor comments to the spec + major comment for the mkl-dnn. But approve in advance.
|
Looks like you changed the mkl-dnn submodule by mistake. |
|
@ilyachur, you are right. Fixed. |
Updated specifications for the OneHot operation. The most notable changes are: