Commit 9bcbfc16 authored by RJ Ryan's avatar RJ Ryan Committed by Gunhan Gulsoy
Browse files

Ignore stop indices when shrink_axis_mask is set in tf.lite StridedSlice implementation.

Due to an issue with negative StridedSlice indices in TensorFlow, the end indices can specify degenerate slices when negative indices are used to shrink an axis (e.g. for tf.range(4)[-1], start is -1, end is 0, and stride is 1). This fix works around the issue by ignoring stop indices entirely when an axis is shrinking, since in order to be shrunk the length is by definition 1.

Fixes Issue #19260.

PiperOrigin-RevId: 202398678
parent e3eac29c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment