diff options
author | 2016-01-20 09:53:21 -0800 | |
---|---|---|
committer | 2016-01-20 10:38:46 -0800 | |
commit | c878ce6ae549a72dbdbd2c41f33fa3dec75bb555 (patch) | |
tree | d259ca4b3afcb0c9f646d921aa6dc153b97360c2 /tensorflow/core/public/tensor_shape.h | |
parent | c8eaac926c929e07ac8db69f67803a2223ff2d93 (diff) |
Change DebugString behavior to ShortDebugString
The old behavior of DebugString is needlessly verbose and is quite confusing
for scalar shapes (it produced the empty string). Now DebugString is the same
as ShortDebugString.
A future commit will remove ShortDebugString.
Change: 112590646
Diffstat (limited to 'tensorflow/core/public/tensor_shape.h')
-rw-r--r-- | tensorflow/core/public/tensor_shape.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tensorflow/core/public/tensor_shape.h b/tensorflow/core/public/tensor_shape.h index 40b37cd771..05f1a467ff 100644 --- a/tensorflow/core/public/tensor_shape.h +++ b/tensorflow/core/public/tensor_shape.h @@ -124,13 +124,15 @@ class TensorShape { /// For error messages. string DebugString() const; - string ShortDebugString() const; - // TODO(vrv): Consolidate DebugString() and ShortDebugString() into one - // function that is not verbose and works for scalars. + + /// Same as DebugString() + string ShortDebugString() const { return DebugString(); } + // TODO(irving): Remove, used to be different but isn't now. /// Same as `TensorShape(proto).ShortDebugString()` but doesn't crash for /// invalid protos. static string ShortDebugString(const TensorShapeProto& proto); + // TODO(irving): Rename to DebugString. private: // Recalculates the dimensions of this tensor after they are modified. |