| 380 | } |
| 381 | |
| 382 | TensorShapeOld::TensorShapeOld(const TensorShapeProto& proto) { |
| 383 | dim_sizes_.reserve(proto.dim_size()); |
| 384 | num_elements_ = 1; |
| 385 | for (const auto& d : proto.dim()) { |
| 386 | AddDim(d.size()); |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | TensorShapeOld::TensorShapeOld(gtl::ArraySlice<int64> dim_sizes) { |
| 391 | dim_sizes_.reserve(dim_sizes.size()); |