| 590 | |
| 591 | template <class Shape> |
| 592 | void TensorShapeBase<Shape>::AsProto(TensorShapeProto* proto) const { |
| 593 | proto->Clear(); |
| 594 | if (unknown_rank()) { |
| 595 | proto->set_unknown_rank(true); |
| 596 | } else { |
| 597 | for (int i = 0; i < dims(); i++) { |
| 598 | proto->add_dim()->set_size(dim_size(i)); |
| 599 | } |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | void TensorShapeRep::DumpRep() const { |
| 604 | #if 0 |