| 51 | } |
| 52 | |
| 53 | int64_t TensorShape::at(size_t index) const { |
| 54 | if (index >= rank) { |
| 55 | throw std::runtime_error("TensorShape index out of range"); |
| 56 | } |
| 57 | return dims[index]; |
| 58 | } |
| 59 | |
| 60 | int64_t TensorShape::last_dim() const { |
| 61 | return at(rank - 1); |
no outgoing calls