-
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.
[TFLite] Strided slice handling of shrink_axis_mask improved (#6998)
* [TFLite] Strided slice handlig of shrink_axis_mask improved 1. Added removal of dimensions if result is a scalar to mimic TensorFlow behaviour. E.g.: tf.strided_slice([1,2,3], [0], [1], [1], shrink_axis_mask=0) <tf.Tensor: shape=(1,), dtype=int32, numpy=array([1], dtype=int32)> tf.strided_slice([[[1,2,3],[4,5,6],[7,8,9]]], [0, 0, 0], [3, 3, 3], [1, 1, 1], shrink_axis_mask=7) <tf.Tensor: shape=(), dtype=int32, numpy=1> 2. Added extra check to assert_allclose to check shape equalities as np.testing.assert_allclose() does not distinguish between cases like: np.testing.assert_allclose(1, np.array(1)) np.testing.assert_allclose(1, np.array([1])) np.testing.assert_allclose(np.array(1), np.array([1])) * unit tests fixed
- Loading branch information
Showing
5 changed files
with
36 additions
and
10 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
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
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