diff options
author | Benoit Steiner <bsteiner@google.com> | 2017-11-22 12:13:39 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-11-22 12:17:45 -0800 |
commit | c133aff68cf9020b1eea41b6f0432d309d6b0955 (patch) | |
tree | f63e67a3b009700b1b24eed83ccfdab690e9514a /tensorflow/core/framework/shape_inference.cc | |
parent | 8200bee9e1433a311d7b9e820c09110a88eb6c58 (diff) |
Count the number of loops instead of approximating it.
Also added a few minor cleanups
PiperOrigin-RevId: 176686819
Diffstat (limited to 'tensorflow/core/framework/shape_inference.cc')
-rw-r--r-- | tensorflow/core/framework/shape_inference.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/framework/shape_inference.cc b/tensorflow/core/framework/shape_inference.cc index f30272e250..ee9192d4a1 100644 --- a/tensorflow/core/framework/shape_inference.cc +++ b/tensorflow/core/framework/shape_inference.cc @@ -921,7 +921,7 @@ Status InferenceContext::Add(DimensionHandle first, DimensionOrConstant second, if (first_value == 0) { *out = MakeDim(second); } else if (second_value == 0) { - *out = MakeDim(first); + *out = first; } else if (first_value == kUnknownDim || second_value == kUnknownDim) { *out = UnknownDim(); } else { @@ -946,7 +946,7 @@ Status InferenceContext::Subtract(DimensionHandle first, const int64 second_value = Value(second); // Special cases. if (second_value == 0) { - *out = MakeDim(first); + *out = first; } else if (first_value == kUnknownDim || second_value == kUnknownDim) { *out = UnknownDim(); } else { |