| 634 | } |
| 635 | |
| 636 | string TensorShapeRep::DebugString() const { |
| 637 | const auto& shape = *static_cast<const PartialTensorShape*>(this); |
| 638 | if (shape.unknown_rank()) return "<unknown>"; |
| 639 | string s = "["; |
| 640 | for (int i = 0; i < shape.dims(); i++) { |
| 641 | if (i > 0) strings::StrAppend(&s, ","); |
| 642 | int64 dim = shape.dim_size(i); |
| 643 | if (dim < 0) { |
| 644 | strings::StrAppend(&s, "?"); |
| 645 | } else { |
| 646 | strings::StrAppend(&s, dim); |
| 647 | } |
| 648 | } |
| 649 | strings::StrAppend(&s, "]"); |
| 650 | return s; |
| 651 | } |
| 652 | |
| 653 | string TensorShapeRep::DebugString(const TensorShapeProto& proto) { |
| 654 | string s; |
no test coverage detected