| 2439 | // Converts Tensor to flat std::vector<int64>. |
| 2440 | template <typename InputType> |
| 2441 | std::vector<int64> GetFlatInt64(const Tensor& t) { |
| 2442 | std::vector<int64> output(t.shape().num_elements()); |
| 2443 | auto eigen_vec = t.flat<InputType>(); |
| 2444 | std::copy_n(&eigen_vec(0), output.size(), output.begin()); |
| 2445 | return output; |
| 2446 | } |
| 2447 | |
| 2448 | // Converts int32 or int64 Tensor to flat std::vector<int64>. |
| 2449 | std::vector<int64> GetFlatInt64(const Tensor& t) { |
no test coverage detected