| 139 | } |
| 140 | |
| 141 | string 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 | |
| 155 | template <typename T> |
| 156 | string PrintArray(int64 num_elts, const T* array) { |
no test coverage detected