aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-17 15:02:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-17 15:05:49 -0700
commitdfeee0c45d4127ea0e20fb0a1071c7d59658c169 (patch)
treeb8fa7c0599068e95fa5f6a70b168e08391238b3e /tensorflow/core/util
parente2a0700bbf90f0738e43fbc29ec758adc364347c (diff)
Fix the bug that StridedSlice loses static dimension when dim==0.
PiperOrigin-RevId: 209212830
Diffstat (limited to 'tensorflow/core/util')
-rw-r--r--tensorflow/core/util/strided_slice_op.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/util/strided_slice_op.cc b/tensorflow/core/util/strided_slice_op.cc
index aca60b942d..ad8a44a518 100644
--- a/tensorflow/core/util/strided_slice_op.cc
+++ b/tensorflow/core/util/strided_slice_op.cc
@@ -326,7 +326,7 @@ Status ValidateStridedSliceOp(
// Even if we don't have values for begin or end, we do know that this
// dimension covers the whole interval. If we have shape information for
// this dimension, that tells us the interval length.
- if (dim_i > 0) {
+ if (dim_i >= 0) {
if (stride_i < 0) {
interval_length = -dim_i;
} else {