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

Function PrintTensorShape

tensorflow/cc/framework/cc_op_gen.cc:141–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141string PrintTensorShape(const TensorShapeProto& shape_proto) {
142 PartialTensorShape shape(shape_proto);
143 if (shape.IsIdenticalTo(PartialTensorShape())) {
144 return "::tensorflow::PartialTensorShape() /* unknown */";
145 }
146 string ret = "{";
147 for (int d = 0; d < shape.dims(); ++d) {
148 if (d > 0) strings::StrAppend(&ret, ", ");
149 strings::StrAppend(&ret, shape.dim_size(d));
150 }
151 strings::StrAppend(&ret, "}");
152 return ret;
153}
154
155template <typename T>
156string PrintArray(int64 num_elts, const T* array) {

Callers 2

PrintTensorProtoFunction · 0.85
PrintAttrValueFunction · 0.85

Calls 5

PartialTensorShapeClass · 0.85
StrAppendFunction · 0.50
IsIdenticalToMethod · 0.45
dimsMethod · 0.45
dim_sizeMethod · 0.45

Tested by

no test coverage detected