| 74 | } |
| 75 | |
| 76 | int64_t TensorShape::num_elements() const { |
| 77 | int64_t total = 1; |
| 78 | for (size_t i = 0; i < rank; ++i) { |
| 79 | total *= dims[i]; |
| 80 | } |
| 81 | return total; |
| 82 | } |
| 83 | |
| 84 | TensorShape TensorShape::with_last_dim(int64_t value) const { |
| 85 | TensorShape result = *this; |
no outgoing calls