-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Relay] Fix TFlite frontend for unpack, stridedslice (#10333)
We found this while converting an RNN model. The relay tflite frontend use squeeze at converting unpack, but when the unpack.axis=0, `None` is passed to relay.squeeze(), which would squeeze all dimensions with length 1, causing different results from TFLite. A possible fix might be, assign the unpack.axis as-is to relay.squeeze() As for stridedslice, when the tflite frontend handles shrink_axis_mask, the wrapped `begin` should be used, instead of the original one which can be negative. It can cause errors at https://github.com/apache/tvm/blob/d65ff6594d4d6db0062537a1d43c0504173b8e5c/include/tvm/topi/detail/strided_slice.h#L140 Related cases are also added to the python test.
- Loading branch information
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters