Add logic for StridedSlice ops in ShapeRefiner::ConstantPartialShape().
authorSkye Wanderman-Milne <skyewm@google.com>
Tue, 8 May 2018 00:28:41 +0000 (17:28 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 8 May 2018 01:32:07 +0000 (18:32 -0700)
commit1af09b57ef663d4ab0c02a00e2af1f1e2819d32f
treef56df608f376a0bf594bb30ae9fc99c1c1d4dfa4
parent2585a8181904b39c71fc314940587c02b30a68a6
Add logic for StridedSlice ops in ShapeRefiner::ConstantPartialShape().

This mimics the logic in tensor_util.constant_value_as_shape, allowing
the C++ shape inference code to infer more shapes than it could before.

This change also adds an optional stride argument to InferenceContext::Subshape().

PiperOrigin-RevId: 195749522
tensorflow/core/common_runtime/shape_refiner.cc
tensorflow/core/common_runtime/shape_refiner.h
tensorflow/core/common_runtime/shape_refiner_test.cc
tensorflow/core/framework/shape_inference.cc
tensorflow/core/framework/shape_inference.h