aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/segment_reduction_ops.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-01-06 12:52:30 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2016-01-06 12:52:30 -0800
commit0ce489f4e0c3b12d4dce1b2d642f48f45797774a (patch)
treef438f4c42c98a9e26ace12bb84b3f3be7e3f6745 /tensorflow/core/kernels/segment_reduction_ops.cc
parentd0dfcdbd7bf605f5878f1b3aa2aacd5fcf001e32 (diff)
New GraphDef version 4: TensorFlow is now scalar strict
The kAllowLegacyScalars flag is now gone. Instead, scalar strictness now depends on the GraphDef version: we are lenient below 4 and strict with 4 and above. All new graphs should use version >= 4. The internal Google version of tensorflow is now as scalar strict as the open source release. Note that outside of PLATFORM_GOOGLE, this change has no effect, since the code was already scalar strict. Change: 111467133
Diffstat (limited to 'tensorflow/core/kernels/segment_reduction_ops.cc')
-rw-r--r--tensorflow/core/kernels/segment_reduction_ops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/kernels/segment_reduction_ops.cc b/tensorflow/core/kernels/segment_reduction_ops.cc
index 7ddb7f474f..96cde639c1 100644
--- a/tensorflow/core/kernels/segment_reduction_ops.cc
+++ b/tensorflow/core/kernels/segment_reduction_ops.cc
@@ -184,7 +184,7 @@ class UnsortedSegmentSumOp : public OpKernel {
const Tensor& num_segments = context->input(2);
OP_REQUIRES(
- context, TensorShapeUtils::IsLegacyScalar(num_segments.shape()),
+ context, IsLegacyScalar(num_segments.shape()),
errors::InvalidArgument("num_segments should be a scalar, not shape ",
num_segments.shape().ShortDebugString()));
@@ -406,7 +406,7 @@ class SparseSegmentMeanGradOp : public OpKernel {
errors::InvalidArgument("indices should be a vector."));
OP_REQUIRES(context, TensorShapeUtils::IsVector(segment_ids.shape()),
errors::InvalidArgument("segment_ids should be a vector."));
- OP_REQUIRES(context, TensorShapeUtils::IsLegacyScalar(output_dim0.shape()),
+ OP_REQUIRES(context, IsLegacyScalar(output_dim0.shape()),
errors::InvalidArgument("output_dim0 should be a scalar."));
const int64 N = indices.NumElements();