| 1309 | |
| 1310 | template <typename T> |
| 1311 | Tensor MkTensor(DataType dt, const TensorShape& shape, |
| 1312 | std::vector<T> init_values) { |
| 1313 | Tensor x(dt, shape); |
| 1314 | const int limit = x.NumElements(); |
| 1315 | int vi = 0; |
| 1316 | for (int i = 0; i < limit; ++i) { |
| 1317 | x.flat<T>()(i) = init_values[vi++]; |
| 1318 | if (vi >= init_values.size()) vi = 0; |
| 1319 | } |
| 1320 | return x; |
| 1321 | } |
| 1322 | |
| 1323 | TEST(SummarizeValue, Uninitialized) { |
| 1324 | Tensor x(DT_INT32); |
nothing calls this directly
no test coverage detected