| 1434 | } |
| 1435 | |
| 1436 | TensorShape to_tensor_shape(const std::vector<int64_t>& shape) { |
| 1437 | std::vector<size_t> dims; |
| 1438 | dims.reserve(shape.size()); |
| 1439 | for (auto d : shape) { |
| 1440 | dims.push_back(static_cast<size_t>(d)); |
| 1441 | } |
| 1442 | return TensorShape(dims); |
| 1443 | } |
| 1444 | } // namespace |
| 1445 | |
| 1446 | // Type conversion (needs parse_dtype from anonymous namespace) |