| 1359 | } |
| 1360 | |
| 1361 | string BundleReader::DebugString() { |
| 1362 | // Format used below emulates that of TensorSliceReader::DebugString(). |
| 1363 | string shape_str; |
| 1364 | BundleEntryProto entry; |
| 1365 | Seek(kHeaderEntryKey); |
| 1366 | for (Next(); Valid(); Next()) { |
| 1367 | CHECK(entry.ParseFromArray(value().data(), value().size())); |
| 1368 | if (entry.slices_size() > 0) continue; // Slice of some partitioned var. |
| 1369 | |
| 1370 | strings::StrAppend(&shape_str, key(), " (", |
| 1371 | EnumName_DataType(entry.dtype()), ") ", |
| 1372 | TensorShape(entry.shape()).DebugString()); |
| 1373 | strings::StrAppend(&shape_str, "\n"); |
| 1374 | } |
| 1375 | return shape_str; |
| 1376 | } |
| 1377 | |
| 1378 | FileOutputBuffer::~FileOutputBuffer() { delete file_; } |
| 1379 | |