| 581 | } |
| 582 | |
| 583 | bool TensorShape::IsSameSize(const TensorShape& b) const { |
| 584 | if (b.dims() != dims()) return false; |
| 585 | for (int d = 0; d < dims(); d++) { |
| 586 | if (dim_size(d) != b.dim_size(d)) return false; |
| 587 | } |
| 588 | return true; |
| 589 | } |
| 590 | |
| 591 | template <class Shape> |
| 592 | void TensorShapeBase<Shape>::AsProto(TensorShapeProto* proto) const { |