-
Notifications
You must be signed in to change notification settings - Fork 120
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
[converter] correct non-compliant axis handling in split and splitV ops #346
Conversation
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 your PR. Let's wait for the CI to finish
According to the docs here, it seems that |
From the case of the code, it looks like the implementation of the two operators regarding this part is the same. axis takes only one value. https://github.com/tensorflow/tensorflow/blob/631973738040e1fdceb02584c5a07317f333d732/tensorflow/lite/kernels/split.cc#L54 |
@LynnL4 Yes, it looks like TFL core doesn't care about the shape of the dim tensor. We could adapt to 0-d tensors if other projects do this as well. Please fix the unit tests so that I can take the changes in. |
All I know is that the ST EDGE AI conversion tool has this limitation. Also on the arm vela conversion tool it converts fine whether it's 0-D or not. |
@peterjc123 Bugs have been fixed according to CI |
fc40ed3
to
626a757
Compare
Hi,
This PR fixes the axis input for the split and splitV operations to match TensorFlow's definition, which requires a 0-D int32 tensor. The previous implementation incorrectly used an array, causing some model converters to fail.
FYI
https://tensorflow.google.cn/api_docs/python/tf/raw_ops/Split
https://tensorflow.google.cn/api_docs/python/tf/raw_ops/SplitV