MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DebugString

Method DebugString

tensorflow/core/framework/tensor_shape.cc:636–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634}
635
636string 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
653string TensorShapeRep::DebugString(const TensorShapeProto& proto) {
654 string s;

Callers 4

RecomputeNumElementsMethod · 0.45
ShapeListStringMethod · 0.45
MergeWithMethod · 0.45

Calls 6

unknown_rankMethod · 0.80
StrAppendFunction · 0.50
dimsMethod · 0.45
dim_sizeMethod · 0.45
dimMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected