diff options
author | 2016-01-06 12:54:21 -0800 | |
---|---|---|
committer | 2016-01-06 12:54:21 -0800 | |
commit | a1d4149a6eceebf2a5634b67e0c3a92566e7e566 (patch) | |
tree | 3a713465c775490f8962d1f66f788f201eddef63 /tensorflow/core/kernels/slice_op.cc | |
parent | b947bcc154db62e2306e8bf3edb1a94868edbbca (diff) |
Change: 111522571
Diffstat (limited to 'tensorflow/core/kernels/slice_op.cc')
-rw-r--r-- | tensorflow/core/kernels/slice_op.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tensorflow/core/kernels/slice_op.cc b/tensorflow/core/kernels/slice_op.cc index 17a8d25f36..5990e64255 100644 --- a/tensorflow/core/kernels/slice_op.cc +++ b/tensorflow/core/kernels/slice_op.cc @@ -69,15 +69,14 @@ static void SharedValidation(OpKernelContext* context, const Tensor& size_tensor = context->input(2); OP_REQUIRES( - context, context->op_kernel().IsLegacyVector(begin_tensor.shape()) && - context->op_kernel().IsLegacyVector(size_tensor.shape()) && + context, TensorShapeUtils::IsLegacyVector(begin_tensor.shape()) && + TensorShapeUtils::IsLegacyVector(size_tensor.shape()) && begin_tensor.NumElements() == input.dims() && size_tensor.NumElements() == input.dims(), errors::InvalidArgument( "Expected begin and size arguments to be 1-D tensors of size ", - input.dims(), ", but got shapes ", - begin_tensor.shape().ShortDebugString(), " and ", - size_tensor.shape().ShortDebugString(), " instead.")); + input.dims(), ", but got ", begin_tensor.NumElements(), " and ", + size_tensor.NumElements(), " instead.")); const int input_dims = input.dims(); *begin = IntTensorToInt64Vec(begin_tensor); |